-
Notifications
You must be signed in to change notification settings - Fork 628
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
Minor fixes for Go bindings #2676
Minor fixes for Go bindings #2676
Conversation
case C.WASM_FUNCREF: | ||
fallthrough |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switch cases in Go require an explicit fallthrough, they break by default
@@ -1,4 +1,4 @@ | |||
module gitlab.alipay-inc.com/TNT_Runtime/ant-runtime/bindings/go | |||
module github.com/bytecodealliance/wasm-micro-runtime/language-bindings/go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when using the Go bindings in a separate project, the module name must match the project URL, and the test below must use the same URL, too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also we put header and libraries files under github.com/bytecodealliance/wasm-micro-runtime/language-bindings/go/packaged
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The header files and the host-native library are installed under go/packaged/
by go/build.sh
. But there's also the script go/samples/build.sh
, which does practically the same but always puts the host-native library into go/packaged/lib/amd64
, which is incorrect, e.g., on arm64. What about just removing go/samples/build.sh
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about not removing go/samples/build.sh
, instead, just letting it call the go/build.sh
first and then building the sample, for example:
CUR_DIR=$PWD
pushd ${CUR_DIR}/.. > /dev/null 2>&1
./build.sh
popd > /dev/null 2>& 1
cd ${CUR_DIR}
rm -f test
go build test.go
./test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #2681
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.