summaryrefslogtreecommitdiffstats
path: root/third_party/wasm2c/src/wasm2c.h.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/wasm2c/src/wasm2c.h.tmpl')
-rw-r--r--third_party/wasm2c/src/wasm2c.h.tmpl51
1 files changed, 51 insertions, 0 deletions
diff --git a/third_party/wasm2c/src/wasm2c.h.tmpl b/third_party/wasm2c/src/wasm2c.h.tmpl
new file mode 100644
index 0000000000..a79f924e09
--- /dev/null
+++ b/third_party/wasm2c/src/wasm2c.h.tmpl
@@ -0,0 +1,51 @@
+%%top
+/* Automically generated by wasm2c */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+
+#include "wasm-rt.h"
+
+#ifndef WASM_RT_MODULE_PREFIX
+#define WASM_RT_MODULE_PREFIX
+#endif
+
+#define WASM_RT_PASTE_(x, y) x ## y
+#define WASM_RT_PASTE(x, y) WASM_RT_PASTE_(x, y)
+#define WASM_RT_ADD_PREFIX(x) WASM_RT_PASTE(WASM_RT_MODULE_PREFIX, x)
+
+#define WASM_CURR_ADD_PREFIX(x) WASM_RT_PASTE(WASM_CURR_MODULE_PREFIX, x)
+
+/* TODO(binji): only use stdint.h types in header */
+typedef uint8_t u8;
+typedef int8_t s8;
+typedef uint16_t u16;
+typedef int16_t s16;
+typedef uint32_t u32;
+typedef int32_t s32;
+typedef uint64_t u64;
+typedef int64_t s64;
+typedef float f32;
+typedef double f64;
+
+#ifndef WASM_DONT_EXPORT_FUNCS
+# if defined(_WIN32)
+# define FUNC_EXPORT __declspec(dllexport)
+# else
+# define FUNC_EXPORT
+# endif
+#else
+# define FUNC_EXPORT
+#endif
+
+FUNC_EXPORT wasm2c_sandbox_funcs_t WASM_CURR_ADD_PREFIX(get_wasm2c_sandbox_info)();
+
+struct wasm2c_sandbox_t;
+typedef struct wasm2c_sandbox_t wasm2c_sandbox_t;
+%%bottom
+
+#ifdef __cplusplus
+}
+#endif