Skip to content
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

Use feature flag to enable wasm builds #159

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nothingismagick
Copy link
Contributor

Closes #151.

This just adds a feature flag (and relevant uuid feature) that allows devs to conditionally compile riker for wasm runtimes.

@nothingismagick
Copy link
Contributor Author

I didn't mention that I tested this both with build and test (on macos).

Signed-off-by: Daniel Thompson-Yvetot <[email protected]>
@nothingismagick
Copy link
Contributor Author

This can get merged, its a non-breaking change.

@lukewestby
Copy link

@nothingismagick does this need to be made more general? futures::executor::ThreadPool isn't supported in WASM yet.

https://github.com/nothingismagick/riker/blob/master/src/system.rs#L269

@siriux
Copy link

siriux commented Feb 5, 2021

@lukewestby I'm working on an agnostic executor library to enable riker to use different executors, including WASM. That would be a first step into making riker wasm compatible.

#152

But it's not only the threadpool, it's also integrating with timers (also supported by the new library), testing with wasm-pack, using channels that work in WASM (it can be tricky sometimes) and I'm sure many more things.

@lukewestby
Copy link

Understood. Thank you!

@siriux
Copy link

siriux commented Feb 8, 2021

Just to let you know, I'm not sure anymore that riker can ever support WASM without major changes.
That's because WASM doesn't support catching panics, and riker heavily relies on this for its supervision model.

And even if major incompatible changes were introduced to fix that, there are still many more things to fix.

Sure, it could be done, but it's probably better to create a lighter actor library from scratch, with WASM and agnostic executors support baked in from the beginning. And leave riker for the server use case that was designed for.

@nothingismagick
Copy link
Contributor Author

WASM isn't just for the browser and riker isn't just for a server... Just saying

@siriux
Copy link

siriux commented Feb 8, 2021

Sure. Let's just say current riker design is not really WASM friendly. Anyone can apply it to their own use case ;-)

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.

Enable riker to build in wasm
4 participants