feat: add a histrical wit-bindgen

This commit is contained in:
2023-01-01 00:25:48 +08:00
parent 01e8f5a959
commit aa50d63aec
419 changed files with 45283 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
#include <stdint.h>
#include <stdlib.h>
#include "smw/abort.h"
#include "smw/wasm.h"
namespace smw {
WASM_EXPORT
void* SMW_malloc(size_t size) {
auto p = malloc(size);
if (p == nullptr) {
abort("out of memory");
}
return p;
}
} // namespace smw