summaryrefslogtreecommitdiff
path: root/src/template/wasm2c.top.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/template/wasm2c.top.h')
-rw-r--r--src/template/wasm2c.top.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/template/wasm2c.top.h b/src/template/wasm2c.top.h
new file mode 100644
index 00000000..5c60191b
--- /dev/null
+++ b/src/template/wasm2c.top.h
@@ -0,0 +1,22 @@
+#include <stdint.h>
+
+#include "wasm-rt.h"
+
+/* TODO(binji): only use stdint.h types in header */
+#ifndef WASM_RT_CORE_TYPES_DEFINED
+#define WASM_RT_CORE_TYPES_DEFINED
+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;
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif