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.
11 lines
159 B
Plaintext
11 lines
159 B
Plaintext
(module
|
|
(func $main (local i32)
|
|
(set_local 0 (i32.const 0))
|
|
(drop (call $inc))
|
|
)
|
|
(func $inc (result i32)
|
|
(i32.const 1)
|
|
)
|
|
(start $main)
|
|
)
|