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

How can i edit a program with golang and build it with tiny-go, then i can get wasm file? #390

Open
HBrightShown opened this issue Apr 13, 2023 · 0 comments
Labels
❓ question Further information is requested

Comments

@HBrightShown
Copy link

I met a problem:
I want to build a file to wasm file with golang, so how i cant communication with wasmer-go? I saw some example in wasmer-go, all example given like by follows:

wasmBytes := []byte(`
(module
(global $one (export "one") f32 (f32.const 1))
(global $some (export "some") (mut f32) (f32.const 0))

	  (func (export "get_one") (result f32) (global.get $one))
	  (func (export "get_some") (result f32) (global.get $some))

	  (func (export "set_some") (param f32) (global.set $some (local.get 0))))
`)

so, how i write a golang file and build it ,then i get wasmBytes? Others, how i transfer string and struct parameter to this file?

@HBrightShown HBrightShown added the ❓ question Further information is requested label Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓ question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant