diff options
author | magic-akari <akari.ccino@gmail.com> | 2022-03-18 01:27:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-17 17:27:28 +0000 |
commit | b7e1989553a645968399ad379a86b809e04c0ae2 (patch) | |
tree | 714472a3d156ad55f1a8ba1618426426b7295433 /test/wasm2js/export_global.wast | |
parent | 86acb00c7095017f8bded15def3c928909099731 (diff) | |
download | binaryen-b7e1989553a645968399ad379a86b809e04c0ae2.tar.gz binaryen-b7e1989553a645968399ad379a86b809e04c0ae2.tar.bz2 binaryen-b7e1989553a645968399ad379a86b809e04c0ae2.zip |
[wasm2js] Support exports of Globals (#4523)
Export an object with a `.value` property like the wasm JS API does
in browsers, and implement them with a getter and setter.
Fixes #4522
Diffstat (limited to 'test/wasm2js/export_global.wast')
-rw-r--r-- | test/wasm2js/export_global.wast | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/wasm2js/export_global.wast b/test/wasm2js/export_global.wast new file mode 100644 index 000000000..9b990be8d --- /dev/null +++ b/test/wasm2js/export_global.wast @@ -0,0 +1,6 @@ +(module + (global $global0 i32 (i32.const 655360)) + (export "HELLO" (global $global0)) + (func (result i32) (i32.const 42)) + (export "helloWorld" (func 0)) +)
\ No newline at end of file |