mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 19:17:47 +00:00
feature: add buildmode=wasi-legacy to support existing base of users who expected the
older behavior for wasi modules to not return an exit code as if they were reactors. See #4726 for some details on what this is intended to address. Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
@@ -52,6 +52,15 @@ func wasmEntryReactor() {
|
||||
}
|
||||
}
|
||||
|
||||
// This is the _start entry point, when using -buildmode=wasi-legacy.
|
||||
func wasmEntryLegacy() {
|
||||
// These need to be initialized early so that the heap can be initialized.
|
||||
initializeCalled = true
|
||||
heapStart = uintptr(unsafe.Pointer(&heapStartSymbol))
|
||||
heapEnd = uintptr(wasm_memory_size(0) * wasmPageSize)
|
||||
run()
|
||||
}
|
||||
|
||||
// Whether the runtime was initialized by a call to _initialize or _start.
|
||||
var initializeCalled bool
|
||||
|
||||
|
||||
Reference in New Issue
Block a user