-
Notifications
You must be signed in to change notification settings - Fork 23
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 support #64
Comments
This is really nice, what would it take to some of the wasm support put upstream? |
|
Thanks for the reply, I think up-streaming this addition would fare better than maintaining a fork. My question was more along the lines of what mutually exclusive compilation flags to do you foresee this would add (to for example handle wasm32 compilation targets) |
I don't know what you mean. You compile with |
I've gone through your changes, I think I answered my own question. |
I've got Wasm support mostly working at this repo.
I also updated to clapv4.
Since you can't spawn multiple processes in Wasm it's set up to use an async main and poll the resulting future concurrently with the gui as explained here.
The file functionality has to come from within the main function the user of the library provides since you have to read a full file to memory instead of being able to use paths directly. For example using
rfd's
AsyncFileDialog
Also since stdout, stderr, stdin, etc... can't be redirected without nightly I used a custom logger that writes any logs to the gui instead of stdout.
A demo which uses these changes is visible here
I don't know if there's interest in merging some of these features here or not, but I thought it was worth bringing to attention.
The text was updated successfully, but these errors were encountered: