WASI & darwin: support basic file io based on libc

Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
Takeshi Yoneda
2021-03-18 12:53:32 +09:00
committed by Ron Evans
parent 6d3c11627c
commit 1406453350
16 changed files with 390 additions and 84 deletions
+5
View File
@@ -8,11 +8,16 @@ import (
type timeUnit int64
// libc constructors
//export __wasm_call_ctors
func __wasm_call_ctors()
//export _start
func _start() {
// These need to be initialized early so that the heap can be initialized.
heapStart = uintptr(unsafe.Pointer(&heapStartSymbol))
heapEnd = uintptr(wasm_memory_size(0) * wasmPageSize)
__wasm_call_ctors()
run()
}