-
Notifications
You must be signed in to change notification settings - Fork 220
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 "parallel" feature flag #353
Conversation
Hm, it still doesn't build when referenced in my project via Anyway, I feel like there's some cleanup to be done in features in Cargo.toml here. I've added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise 👍 Thank you!
Cargo.toml
Outdated
mopa = "0.2" | ||
shred = "0.6.0" | ||
shrev = "0.8.0" | ||
shred-derive = "0.4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you accidentally deleted this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, restored
Also, maybe we can add a Travis job to ensure Specs builds for wasm32 in the future. |
to control inclusion of functionality requiring multithreading.
Note - I'd still like to check what is the cause of the build problem in my project, whether it requires some attention in specs Cargo.toml or not. Hadn't got time for this lately though ... |
OK, it was just missing |
@@ -163,6 +168,7 @@ pub trait Join { | |||
/// The purpose of the `ParJoin` trait is to provide a way | |||
/// to access multiple storages in parallel at the same time with | |||
/// the merged bit set. | |||
#[cfg(feature = "parallel")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meh, this isn't really ideal. One should be able to compile just the same code for wasm, but this disallows ParJoin
. Instead we'd need a fallback for it. But I'm not sure if we can use rayon at all on wasm :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that rayon
should build with wasm (rayon-rs/rayon#503), but as wasm doesn't support threads it just panics when using it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh, what's the point of being able to compile something only for it to blow up later? I thought this behaviour of wasm32-unknown-unknown target is something that's just done so that it can be shipped earlier. Anyhow, I can change it if you wish
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless the fallback would be to define ParJoin as Join?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't implying we should use it, but just providing info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh, what's the point of being able to compile something only for it to blow up later?
No, the point is it shouldn't fail but fall back to sequential joining. The problem with "defining ParJoin
as Join
" is that ParJoin
has a different (rayon) API.
I'm planning on getting out a new Specs version soon, is anybody still interested in fixing this? It's not really a priority for me right now, although I'd like to target wasm in the future. |
How to fix this issue
|
Closing due to inactivity. |
This allows it to be built for targets such as wasm32
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)