Skip to content

Commit fffd126

Browse files
committed
Update TinyGo templates to address static init problems
E.g. this should fix static logging objects not being ready, os.Environ(), etc. Signed-off-by: itowlson <[email protected]>
1 parent e8edf4d commit fffd126

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

.github/actions/spin-ci-dependencies/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ inputs:
6868
type: bool
6969
tinygo-version:
7070
description: 'tinygo version to setup'
71-
default: 'v0.27.0'
71+
default: 'v0.35.0'
7272
required: false
7373
type: string
7474

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ jobs:
203203
go-version: '1.20.1'
204204
- uses: acifani/setup-tinygo@v2
205205
with:
206-
tinygo-version: '0.27.0'
206+
tinygo-version: '0.35.0'
207207
- uses: actions/setup-node@v3
208208
with:
209209
node-version: '20.x'

templates/http-go/content/spin.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ component = "{{project-name | kebab_case}}"
1414
source = "main.wasm"
1515
allowed_outbound_hosts = []
1616
[component.{{project-name | kebab_case}}.build]
17-
command = "tinygo build -target=wasi -gc=leaking -no-debug -o main.wasm main.go"
17+
command = "tinygo build -target=wasip1 -gc=leaking -scheduler=none -buildmode=c-shared -no-debug -o main.wasm ."
1818
watch = ["**/*.go", "go.mod"]

templates/http-go/metadata/snippets/component.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ component = "{{project-name | kebab_case}}"
66
source = "{{ output-path }}/main.wasm"
77
allowed_outbound_hosts = []
88
[component.{{project-name | kebab_case}}.build]
9-
command = "tinygo build -target=wasi -gc=leaking -no-debug -o main.wasm main.go"
9+
command = "tinygo build -target=wasip1 -gc=leaking -scheduler=none -buildmode=c-shared -no-debug -o main.wasm ."
1010
workdir = "{{ output-path }}"
1111
watch = ["**/*.go", "go.mod"]

0 commit comments

Comments
 (0)