-
Notifications
You must be signed in to change notification settings - Fork 26
WASM FFI #204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WASM FFI #204
Conversation
Copied from https://github.com/rust-bitcoin/rust-secp256k1/tree/97dade55812765e0c6ddce44377d9ccd8d97f54b/secp256k1-sys/wasm Added printf dummy to stdio.h
Bind all C types that are used in libsimplicity. Prefix these types with c_. Define types like UWORD by these types, like in the C code. Verify these types in unit tests.
Remove dependency on libc
Disabled because file doesn't exist yet.
8d42aa0 to
f7de51e
Compare
|
Rebased onto master. Extended the existing C type definitions and tests. Removed wrapper.h because the file will be vendored. |
|
utACK f7de51e. 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? |
| /* This file has been automatically generated. */ | ||
|
|
||
| use std::ffi::c_void; | ||
| use crate::ffi::c_void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In 8e7f59b:
You are not allowed to change this file directly. It needs to be changed upstream and then pulled in by the vendoring script.
|
Let's merge this PR first and then match the changes in BlockstreamResearch/simplicity#218. Feel free to run your test suite |
|
My test suite will not pass if you are modifying files that originate in the upstream library. |
Upgrades the FFI to work with WASM.
Remove dependency on libc. Fix definition of
UWORD, which isu16on WASM !=u32 = usize. Prepare for wrapped jets.