BlockstreamResearch / rust-simplicity

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

WASM FFI 2 #205

Closed uncomputable closed 6 months ago

uncomputable commented 7 months ago

Make rust-simplicity compile in WASM.

Move test-only FFI bindings into separate module, separating them from jet-only FFI bindings. The latter compile in WASM while the former don't.

Define more C types (checked in WASM) and use these local types. Remove libc dependency entirely.

Redefine allocation in Rust.

apoelstra commented 7 months ago

CI failure looks real.

uncomputable commented 7 months ago

Fixed the fuzz tests. The import paths changed and test-utils needed to be activated.

apoelstra commented 7 months ago

a37068e5c8219ba50f482ab591382a39319cbfef looks fine to me. Cannot test locally because #204 broke my local CI.

uncomputable commented 7 months ago

Sorry for the broken CI :) I will get the Haskell Gen PR up to speed in the next 24 hours.

uncomputable commented 6 months ago

Depends on #208. Rebased onto #208 and added allocation.

uncomputable commented 6 months ago

Updated to use the allocator functions from https://github.com/BlockstreamResearch/simplicity/pull/222.

MSRV broke CI again. This error likely exists on master. I will work on a separate CI overhaul PR. In the meantime, let's ignore the CI failure and move forward with the present PR.

uncomputable commented 6 months ago

CI is fixed in #210

uncomputable commented 6 months ago

Rebased on master and updated lock file

uncomputable commented 6 months ago

Added runtime assertions to the allocation function.

apoelstra commented 6 months ago

Note that I had to explicitly whitelist the simplicity_alloc.h file when checking the diff between this repo and upstream. I think that's the right approach.