Skip to content

Wasm support#198

Merged
belijzajac merged 4 commits intograndinetech:update_upstreamfrom
autonomys:wasm-support
Mar 6, 2023
Merged

Wasm support#198
belijzajac merged 4 commits intograndinetech:update_upstreamfrom
autonomys:wasm-support

Conversation

@nazar-pc
Copy link
Contributor

@nazar-pc nazar-pc commented Mar 4, 2023

Initially my goal was to make it no_std compatible and it almost is, but blst isn't (see supranational/blst#150), without that it still compiles for wasm32-unknown-unknown target, but wouldn't work for target that doesn't have standard library at all.

I'll send a PR with full no_std support once supranational/blst#150 or similar is upstreamed.

Wasm is skipped in CI on macOS because it needs proper Clang with wasm support and not the default Apple's contraption. But it didn't seem worthwhile to add LLVM installation on top since if it works on Linux and Windows, it'll work the same exact way on macOS too given compiler support.

@sauliusgrigaitis
Copy link
Member

Thanks @nazar-pc ! However, I don't think we should exclude eip-4844 module from Wasm support. I really would like to avoid this patchy dolly approach. Is there something unsolvable for eip-4844 to support Wasm?

@nazar-pc
Copy link
Contributor Author

nazar-pc commented Mar 6, 2023

eip-4844 turned out to be a bit more involved, for instance it uses file system access for load_trusted_setup_file*. It is certainly still possible to expose most of the stuff, but I wasn't interested in it so decided to make it optional.

Should I expose all the APIs that are possible as is and remove optional eip-4844 feature?

@sauliusgrigaitis
Copy link
Member

Yes, I think we should remove the optional eip-4844 feature. However, I'm not sure how much of exposed C API we can port to WASM and how much sense there actually is to do it. But let's try first and then make a decision.

@nazar-pc
Copy link
Contributor Author

nazar-pc commented Mar 6, 2023

Done

@sauliusgrigaitis
Copy link
Member

@belijzajac could you double-check and merge?

@belijzajac belijzajac merged commit 6e3b48a into grandinetech:update_upstream Mar 6, 2023
@nazar-pc nazar-pc deleted the wasm-support branch May 12, 2023 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants