55
55
#include <stdlib.h>
56
56
#include "wasm.h"
57
57
58
+ #if defined(WASMER_COMPILER_ENABLED )
58
59
/**
59
60
* Kind of compilers that can be used by the engines.
60
61
*
@@ -66,6 +67,7 @@ typedef enum {
66
67
LLVM = 1 ,
67
68
SINGLEPASS = 2 ,
68
69
} wasmer_compiler_t ;
70
+ #endif
69
71
70
72
/**
71
73
* Kind of engines that can be used by the store.
@@ -143,10 +145,18 @@ intptr_t wasi_env_read_stdout(wasi_env_t *env, char *buffer, uintptr_t buffer_le
143
145
#endif
144
146
145
147
#if defined(WASMER_WASI_ENABLED )
148
+ /**
149
+ * This function is deprecated. You may safely remove all calls to it and everything
150
+ * will continue to work.
151
+ */
146
152
bool wasi_env_set_instance (wasi_env_t * env , const wasm_instance_t * instance );
147
153
#endif
148
154
149
155
#if defined(WASMER_WASI_ENABLED )
156
+ /**
157
+ * This function is deprecated. You may safely remove all calls to it and everything
158
+ * will continue to work.
159
+ */
150
160
void wasi_env_set_memory (wasi_env_t * env , const wasm_memory_t * memory );
151
161
#endif
152
162
@@ -168,10 +178,12 @@ wasm_func_t *wasi_get_start_function(wasm_instance_t *instance);
168
178
wasi_version_t wasi_get_wasi_version (const wasm_module_t * module );
169
179
#endif
170
180
181
+ #if defined(WASMER_COMPILER_ENABLED )
171
182
/**
172
183
* Configure the compiler to use.
173
184
*/
174
185
void wasm_config_set_compiler (wasm_config_t * config , wasmer_compiler_t compiler );
186
+ #endif
175
187
176
188
/**
177
189
* Configure the engine to use.
@@ -180,7 +192,7 @@ void wasm_config_set_engine(wasm_config_t *config, wasmer_engine_t engine);
180
192
181
193
void wasm_module_name (const wasm_module_t * module , wasm_name_t * out );
182
194
183
- bool wasm_module_set_name (wasm_module_t * module , const wasm_name_t * name );
195
+ bool wasm_module_set_name (wasm_module_t * module , wasm_name_t * name );
184
196
185
197
/**
186
198
* Gets the length in bytes of the last error if any.
@@ -228,8 +240,8 @@ int wasmer_last_error_message(char *buffer, int length);
228
240
* Parses in-memory bytes as either the WAT format, or a binary Wasm
229
241
* module. This is wasmer-specific.
230
242
*
231
- * In case of failure, `wat2wasm` returns ` NULL`.
243
+ * In case of failure, `wat2wasm` sets the `out->data = NULL` and `out->size = 0 `.
232
244
*/
233
- wasm_byte_vec_t * wat2wasm (const wasm_byte_vec_t * wat );
245
+ void wat2wasm (const wasm_byte_vec_t * wat , wasm_byte_vec_t * out );
234
246
235
247
#endif /* WASMER_WASM_H */
0 commit comments