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

Enable riker to build in wasm #151

Open
nothingismagick opened this issue Dec 16, 2020 · 4 comments · May be fixed by #159
Open

Enable riker to build in wasm #151

nothingismagick opened this issue Dec 16, 2020 · 4 comments · May be fixed by #159

Comments

@nothingismagick
Copy link
Contributor

Trying to get Riker to build in a project using:

cargo build --target=wasm32-unknown-unknown

but it failed with:

error[E0599]: no function or associated item named `new_v4` found for struct `uuid::Uuid` in the current scope
   --> /[redacted]/riker-0.4.2/src/actor/actor_cell.rs:609:24
    |
609 |         let id = Uuid::new_v4();
    |                        ^^^^^^ function or associated item not found in `uuid::Uuid`

I did some quick research and discovered that to enable wasm32 ini uuid, the fix is pretty trivial:

uuid = { version = "0.8.1", features = ["v4", "wasm-bindgen"] }

I tested it by locally building riker and also the consuming project. So its a pretty easy win... Thoughts? I can PR if you agree there is no problem with this.

@hardliner66
Copy link
Contributor

I think it's good be able to compile to wasm. But as I see it, the "wasm-bindgen" feature in the uuid crate would pull in an additional dependency.

Can we make this optional behind our own feature?

@nothingismagick
Copy link
Contributor Author

I think that would be the way to do it, yes. Will make a PR tomorrow.

@hardliner66
Copy link
Contributor

Any updates on this?

@nothingismagick
Copy link
Contributor Author

nothingismagick commented Jan 9, 2021

Ojey, I forgot to do this. Thanks for the reminder!

@nothingismagick nothingismagick linked a pull request Jan 11, 2021 that will close this issue
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 a pull request may close this issue.

2 participants