wasm32: define c_uint_fast16_t as u32#341
wasm32: define c_uint_fast16_t as u32#341egasimus wants to merge 1 commit intoBlockstreamResearch:masterfrom
Conversation
|
This value was originally set in commit 0386d3c in #204. The PR description there explicitly says that this value should be u16 not u32. cc @uncomputable do you remember anything about this, what toolchain you used, etc? Meanwhile, @egasimus I'm going to need you to write up a bunch more details about what you're doing, so that when we inevitably need to change this again we'll have more information. |
|
I ran the unit tests using the |
|
Hi, sorry it took a bit to respond. I build for Wrote up more details in README of hackbg/simf where the action happens. Given Nix, it's easy to run the tests (though you'd have to clone the parent repo and chdir). Since reporting this, I've pinned So, reverting What you'd see: an unmemorable jet error, which does not overtly present as a toolchain bug. But which did, eventually, trace to the With the present PR applied, I'm seeing the resulting WASM compiling SimplicityHL programs to P2TR correctly in V8 (Deno, Chrome). I should put it through its paces more, definitely run the test suite. Here's one weird occurence: I expected I wonder whether similar behavior can be observed in LWK builds as well. I see some good work in https://github.com/Blockstream/lwk/blob/master/lwk_wasm/flake.nix for example. Maybe Clang 15 is what's dodging this footgun in that case. |
I've approached SimplicityHL by compiling the SimplicityHL compiler to
wasm32-unknown-unknown, so that I would be able to invoke it from JS.After producing a program's P2TR address, the next step is to construct a spend PSET; trying to do that, I kept running into an opaque
JetFailederror when callingsatisfy_with_env.I traced that to the
UWORDsize/align checks insimplicity::ffi::c_jets::sanity_checks. Definingc_uint_fast16_tit asu32on WASM seems to fix it.