BlockstreamResearch / rust-simplicity

Creative Commons Zero v1.0 Universal
58 stars 12 forks source link

WASM FFI #204

Closed uncomputable closed 7 months ago

uncomputable commented 7 months ago

Upgrades the FFI to work with WASM.

Remove dependency on libc. Fix definition of UWORD, which is u16 on WASM != u32 = usize. Prepare for wrapped jets.

uncomputable commented 7 months ago

Rebased onto master. Extended the existing C type definitions and tests. Removed wrapper.h because the file will be vendored.

apoelstra commented 7 months ago

utACK f7de51e369e37fb39d0fb8ad7e4f3350aa77e69c.

Will run my local CI (though this does not include any wasm testing, at least for now). Would you like this to be merged or do we want to wait for wrappers.h to be changed upstream?

uncomputable commented 7 months ago

Let's merge this PR first and then match the changes in https://github.com/BlockstreamResearch/simplicity/pull/218. Feel free to run your test suite

apoelstra commented 7 months ago

My test suite will not pass if you are modifying files that originate in the upstream library.