Skip to content

Instantly share code, notes, and snippets.

// it's a simple mark-and-sweep algorithm
// binary layout:
// text, data and bss must be after `loadbase`, then comes the .heap section, then `stacksize` which must come after .heap
#define heapsize 0x10000
#define loadbase 0x200000
#define stacksize 0x4000
@cjihrig
cjihrig / wasi.c
Last active March 21, 2020 14:14
WASI C Header
#include "uvwasi.h"
__wasi_errno_t __wasi_args_get(char** argv, char* argv_buf) {
return __WASI_ENOTSUP;
}
__wasi_errno_t __wasi_args_sizes_get(size_t* argc, size_t* argv_buf_size) {
return __WASI_ENOTSUP;