You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I'm using tinygo 0.34.0 and experiencing strange behavior when trying to compile to wasi (preview 1).
I'm surprise those 3 commands do not produce the same binary:
First, what is the preferred way to specify the target between -target and GOOS=wasip1? And what is the difference? The binary sizes don't match, but they seem to do the same thing.
Second, specifying the output seems to override the GOOS (second command). In my case, the first and third commands produce binaries whose imports only com from wasp1:
It seems the deduced target from the extension of the output file (here I imagine its a default "wasm" target) overrides the one specified in GOOS. And indeed the binary is the same produced with this command without GOARCH and GOOS:
$ tinygo build -o hello.wasm hello.go
Is this intended behavior?
This is not directly related, is specifying the output file after the input intended to be invalid (I'm not sure I understand the error)?
$ tinygo build hello.go -o hello.wasm
Build compiles the packages named by the import paths, along with their
dependencies, but it does not install the results. The output binary is
specified using the -o parameter. The generated file type depends on the
extension: ...
The text was updated successfully, but these errors were encountered:
Hi! I'm using tinygo 0.34.0 and experiencing strange behavior when trying to compile to wasi (preview 1).
I'm surprise those 3 commands do not produce the same binary:
First, what is the preferred way to specify the target between
-target
andGOOS=wasip1
? And what is the difference? The binary sizes don't match, but they seem to do the same thing.Second, specifying the output seems to override the
GOOS
(second command). In my case, the first and third commands produce binaries whose imports only com from wasp1:but the second also imports from
gojs
:It seems the deduced target from the extension of the output file (here I imagine its a default "wasm" target) overrides the one specified in
GOOS
. And indeed the binary is the same produced with this command withoutGOARCH
andGOOS
:$ tinygo build -o hello.wasm hello.go
Is this intended behavior?
This is not directly related, is specifying the output file after the input intended to be invalid (I'm not sure I understand the error)?
The text was updated successfully, but these errors were encountered: