-
-
Notifications
You must be signed in to change notification settings - Fork 119
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
Compile Fornjot to WebAssembly #815
Comments
From previous experience with using WebAssembly, I think the biggest pain points will be 1) making sure each of Fornjot's dependencies can cross-compile, and 2) setting up a JavaScript project which can import Fornjot's WebAssembly module. Surprisingly, most of Fornjot's existing dependencies compile to WebAssembly out of the box. I went through
Compiling to WebAssembly is actually pretty easy as long as we stick within the world of This won't affect a demo app because we have full control over the JavaScript build process, but could cause a bit of friction for someone importing a potential Footnotes
|
Thanks for looking into this, @Michael-F-Bryan! Let's take it one step at a time:
It looks like clipboard support is optional in We can just disable it for now. Once that turns into a problem, we can decide between two solutions:
|
Clipboard support in
We were using Since |
Another option might be to replace |
I have a (currently blocked) draft PR, which would address this issue: #1221 |
One of Fornjot's goals is support for embedding Fornjot models into websites, without any need for a custom backend. To make that possible we need to compile most Fornjot components to WebAssembly, specifically the
wasm32-unknown-unknown
target.The object of this issue is to lay the foundation for browser support, by making sure the required components can be compiled this way. The following steps would need to be taken:
fj-app
, which contains desktop-specific functionality, like handling command-line arguments. But I could be missing something.wasm32-unknown-unknown
and fix any issues that come up.ci.yml
) to guard against accidental regressions.justfile
, to make surejust build
stays close to the CI build (context).Once we have this capability in place, further steps towards web support can be taken.
Labeling as https://github.com/hannobraun/Fornjot/labels/good%20first%20issue, since this is more of a general Rust topic and likely won't require much, if any, knowledge of Fornjot.
The text was updated successfully, but these errors were encountered: