-
-
Save fengb/f0bfe5b1be6612db727a49dd63aeddaa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(module | |
(type (;0;) (func)) | |
(import "env" "glob" (global (;0;) (mut i32))) | |
(func (;0;) (type 0) | |
i32.const 1 | |
global.set 0) | |
(export "foo" (func 0))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern "env" var glob: u32; | |
export fn foo() void { | |
glob = 1; | |
} | |
// $ zig build-lib extern.zig -dynamic -target wasm32-freestanding | |
// lld: error: ./extern.o: undefined symbol: glob |
Author
fengb
commented
Sep 12, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment