File tree Expand file tree Collapse file tree 6 files changed +11
-12
lines changed Expand file tree Collapse file tree 6 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -440,8 +440,9 @@ mod tests {
440440 let mut cmd = process:: Command :: new ( "tinygo" ) ;
441441 cmd. arg ( "build" )
442442 . current_dir ( "tests/go-case" )
443- . arg ( "-target=wasi " )
443+ . arg ( "-target=wasip1 " )
444444 . arg ( "-gc=leaking" )
445+ . arg ( "-buildmode=c-shared" )
445446 . arg ( "-no-debug" )
446447 . arg ( "-o" )
447448 . arg ( out_dir. join ( "go_case.wasm" ) )
Original file line number Diff line number Diff line change 11package main
22
33import (
4- "fmt"
5- "net/http"
64 "errors"
7- "strings "
5+ "fmt "
86 "io"
7+ "net/http"
98 "os"
9+ "strings"
1010
11- spinredis "github.com/fermyon/spin/sdk/go/redis"
12- spinhttp "github.com/fermyon/spin/sdk/go/http"
1311 spinconfig "github.com/fermyon/spin/sdk/go/config"
12+ spinhttp "github.com/fermyon/spin/sdk/go/http"
13+ spinredis "github.com/fermyon/spin/sdk/go/redis"
1414)
1515
1616func init () {
@@ -65,5 +65,3 @@ func execute(v []string) error {
6565
6666 return nil
6767}
68-
69- func main () {}
Original file line number Diff line number Diff line change @@ -12,4 +12,4 @@ allowed_http_hosts = []
1212[component .trigger ]
1313route = " /..."
1414[component .build ]
15- command = " tinygo build -target=wasi -gc=leaking -no-debug -o main.wasm main.go "
15+ command = " tinygo build -target=wasip1 -gc=leaking -buildmode=c-shared - no-debug -o main.wasm . "
Original file line number Diff line number Diff line change @@ -14,5 +14,5 @@ component = "{{project-name | kebab_case}}"
1414source = " main.wasm"
1515allowed_outbound_hosts = []
1616[component .{{project-name | kebab_case}} .build ]
17- command = " tinygo build -target=wasip1 -gc=leaking -scheduler=none - buildmode=c-shared -no-debug -o main.wasm ."
17+ command = " tinygo build -target=wasip1 -gc=leaking -buildmode=c-shared -no-debug -o main.wasm ."
1818watch = [" **/*.go" , " go.mod" ]
Original file line number Diff line number Diff line change @@ -6,6 +6,6 @@ component = "{{project-name | kebab_case}}"
66source = "{{ output-path }}/main.wasm"
77allowed_outbound_hosts = []
88[component.{{project-name | kebab_case}}.build]
9- command = "tinygo build -target=wasip1 -gc=leaking -scheduler=none - buildmode=c-shared -no-debug -o main.wasm ."
9+ command = "tinygo build -target=wasip1 -gc=leaking -buildmode=c-shared -no-debug -o main.wasm ."
1010workdir = "{{ output-path }}"
1111watch = ["**/*.go", "go.mod"]
Original file line number Diff line number Diff line change @@ -17,4 +17,4 @@ component = "{{project-name | kebab_case}}"
1717source = " main.wasm"
1818allowed_outbound_hosts = []
1919[component .{{project-name | kebab_case}} .build ]
20- command = " tinygo build -target=wasi -gc=leaking -no-debug -o main.wasm main.go "
20+ command = " tinygo build -target=wasip1 -gc=leaking -buildmode=c-shared - no-debug -o main.wasm . "
You can’t perform that action at this time.
0 commit comments