5555#include <stdlib.h>
5656#include "wasm.h"
5757
58+ #if defined(WASMER_COMPILER_ENABLED )
5859/**
5960 * Kind of compilers that can be used by the engines.
6061 *
@@ -66,6 +67,7 @@ typedef enum {
6667 LLVM = 1 ,
6768 SINGLEPASS = 2 ,
6869} wasmer_compiler_t ;
70+ #endif
6971
7072/**
7173 * 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
143145#endif
144146
145147#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+ */
146152bool wasi_env_set_instance (wasi_env_t * env , const wasm_instance_t * instance );
147153#endif
148154
149155#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+ */
150160void wasi_env_set_memory (wasi_env_t * env , const wasm_memory_t * memory );
151161#endif
152162
@@ -168,10 +178,12 @@ wasm_func_t *wasi_get_start_function(wasm_instance_t *instance);
168178wasi_version_t wasi_get_wasi_version (const wasm_module_t * module );
169179#endif
170180
181+ #if defined(WASMER_COMPILER_ENABLED )
171182/**
172183 * Configure the compiler to use.
173184 */
174185void wasm_config_set_compiler (wasm_config_t * config , wasmer_compiler_t compiler );
186+ #endif
175187
176188/**
177189 * Configure the engine to use.
@@ -180,7 +192,7 @@ void wasm_config_set_engine(wasm_config_t *config, wasmer_engine_t engine);
180192
181193void wasm_module_name (const wasm_module_t * module , wasm_name_t * out );
182194
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 );
184196
185197/**
186198 * Gets the length in bytes of the last error if any.
@@ -228,8 +240,8 @@ int wasmer_last_error_message(char *buffer, int length);
228240 * Parses in-memory bytes as either the WAT format, or a binary Wasm
229241 * module. This is wasmer-specific.
230242 *
231- * In case of failure, `wat2wasm` returns ` NULL`.
243+ * In case of failure, `wat2wasm` sets the `out->data = NULL` and `out->size = 0 `.
232244 */
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 );
234246
235247#endif /* WASMER_WASM_H */
0 commit comments