This is based on the code in https://github.com/denismerigoux/cretonne/commits/wasm2cretonne before wasmstandalone was removed, with minor updates for the new library structure. It is not yet updated for the latest cretonne API changes.
9 lines
153 B
Plaintext
9 lines
153 B
Plaintext
(module
|
|
(global $x (mut i32) (i32.const 4))
|
|
(memory 1)
|
|
(func $main (local i32)
|
|
(i32.store (i32.const 0) (get_global $x))
|
|
)
|
|
(start $main)
|
|
)
|