Skip to content

Commit

Permalink
wasip2: do not export the _start function
Browse files Browse the repository at this point in the history
It seems to have been replaced with the Component Model `run` function.
  • Loading branch information
aykevl authored and deadprogram committed Sep 6, 2024
1 parent 1f3e000 commit c931bc7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
10 changes: 1 addition & 9 deletions src/runtime/runtime_wasm_wasip2.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,11 @@ type timeUnit int64

//export wasi:cli/run@0.2.0#run
func __wasi_cli_run_run() uint32 {
_start()
return 0
}

//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)
run()
}

func init() {
return 0
}

var args []string
Expand Down
3 changes: 2 additions & 1 deletion targets/wasip2.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
],
"ldflags": [
"--stack-first",
"--no-demangle"
"--no-demangle",
"--no-entry"
],
"extra-files": [
"src/runtime/asm_tinygowasm.S"
Expand Down

0 comments on commit c931bc7

Please sign in to comment.