-
Notifications
You must be signed in to change notification settings - Fork 15
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
Support WebAssembly #92
Conversation
To support non-darwin platforms
The `automergeFFI` clang module is now always imported through SwiftPM's Clang target integration.
This is very exciting! If I understand correctly the |
@alexjg Exactly yes! Users will be able to skip cargo build if we will host pre-compiled static archives. |
…tion and applying swiftformat style updates to some of the code
@kateinoigakukun Thank you - finally had a chance to really sit down with the PR this morning. I've updated it slightly to preserve the generated I want to specifically add some CI work to compile this in WASM during builds to make sure we maintain the canImport() and related bits correctly for a WASM distribution down the road - do you have any suggestions (or examples to easily borrow from and replicate) to set something like that up with GithubActions? I'm guessing a Linux container build step might be easiest, but I just wasn't sure what the current "state of the art" was in setting up a CI with a swift-wasm compilation toolchain on it. |
@heckj Thanks! I added wasm workflow here. |
🎉 |
This PR port this project to WebAssembly by following changes:
Combine
,SwiftUI
,os.log
, andlibdispatch
optional dependencies since they are not available on WebAssembly and non-darwin platforms.Demo
See https://github.com/kateinoigakukun/automerge-swift-wasm
Users need to build
libuniffi_automerge.a
by themselves bycargo build --manifest-path rust/Cargo.toml --target wasm32-wasi --release
and link it by adding linker option.