Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: working tinygo target.json #783

Merged
merged 1 commit into from
Dec 11, 2024
Merged

Conversation

matm
Copy link
Contributor

@matm matm commented Dec 11, 2024

Trying the hello-world project, running make using Go returns several build errors with the current target.json template file.

This PR fixes them by using a working template (should close issue #595).

Currently the errors are:

[wasm-validator error in function 0] unexpected false: Bulk memory operations require bulk memory [--enable-bulk-memory], on
(memory.fill
 (i32.const 14856)
 (i32.const 0)
 (i32.const 905)
)
[wasm-validator error in function 5] unexpected false: Bulk memory operations require bulk memory [--enable-bulk-memory], on
(memory.copy
 (local.get $0)
 (local.get $1)
 (local.get $2)
)
[wasm-validator error in function 6] unexpected false: Bulk memory operations require bulk memory [--enable-bulk-memory], on
(memory.fill
 (local.get $0)
 (local.get $1)
 (local.get $2)
)
[wasm-validator error in function 11] unexpected false: Bulk memory operations require bulk memory [--enable-bulk-memory], on
(memory.copy
 (local.get $0)
 (local.get $1)
 (local.get $2)
)
Fatal: error validating input
wasm-opt failed: exit status 1

The hello-world project compiles successfully with this patch.

Note: tested with Go 1.23.3 and tinygo 0.34.0 (linux/amd64)

Works with Go 1.23.3 and tinygo 0.34.0 (linux/amd64)
@aduros aduros linked an issue Dec 11, 2024 that may be closed by this pull request
@aduros
Copy link
Owner

aduros commented Dec 11, 2024

Thanks so much for taking the time to fix this!

@aduros aduros merged commit f5acbb3 into aduros:main Dec 11, 2024
@matm matm deleted the fix/tinygo-template branch December 12, 2024 06:02
@matm
Copy link
Contributor Author

matm commented Dec 12, 2024

Thanks for the quick merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't run Go template
2 participants