{"action":"created","issue":{"url":"https://api.github.com/repos/slide-rs/specs/issues/341","repository_url":"https://api.github.com/repos/slide-rs/specs","labels_url":"https://api.github.com/repos/slide-rs/specs/issues/341/labels{/name}","comments_url":"https://api.github.com/repos/slide-rs/specs/issues/341/comments","events_url":"https://api.github.com/repos/slide-rs/specs/issues/341/events","html_url":"https://github.com/slide-rs/specs/issues/341","id":294154949,"number":341,"title":"wasm32 support","user":{"login":"BartAdv","id":722564,"avatar_url":"https://avatars3.githubusercontent.com/u/722564?v=4","gravatar_id":"","url":"https://api.github.com/users/BartAdv","html_url":"https://github.com/BartAdv","followers_url":"https://api.github.com/users/BartAdv/followers","following_url":"https://api.github.com/users/BartAdv/following{/other_user}","gists_url":"https://api.github.com/users/BartAdv/gists{/gist_id}","starred_url":"https://api.github.com/users/BartAdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BartAdv/subscriptions","organizations_url":"https://api.github.com/users/BartAdv/orgs","repos_url":"https://api.github.com/users/BartAdv/repos","events_url":"https://api.github.com/users/BartAdv/events{/privacy}","received_events_url":"https://api.github.com/users/BartAdv/received_events","type":"User","site_admin":false},"labels":[{"id":617778845,"url":"https://api.github.com/repos/slide-rs/specs/labels/easy","name":"easy","color":"0e8a16","default":false},{"id":614178757,"url":"https://api.github.com/repos/slide-rs/specs/labels/feature-request","name":"feature-request","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"BartAdv","id":722564,"avatar_url":"https://avatars3.githubusercontent.com/u/722564?v=4","gravatar_id":"","url":"https://api.github.com/users/BartAdv","html_url":"https://github.com/BartAdv","followers_url":"https://api.github.com/users/BartAdv/followers","following_url":"https://api.github.com/users/BartAdv/following{/other_user}","gists_url":"https://api.github.com/users/BartAdv/gists{/gist_id}","starred_url":"https://api.github.com/users/BartAdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BartAdv/subscriptions","organizations_url":"https://api.github.com/users/BartAdv/orgs","repos_url":"https://api.github.com/users/BartAdv/repos","events_url":"https://api.github.com/users/BartAdv/events{/privacy}","received_events_url":"https://api.github.com/users/BartAdv/received_events","type":"User","site_admin":false},"assignees":[{"login":"BartAdv","id":722564,"avatar_url":"https://avatars3.githubusercontent.com/u/722564?v=4","gravatar_id":"","url":"https://api.github.com/users/BartAdv","html_url":"https://github.com/BartAdv","followers_url":"https://api.github.com/users/BartAdv/followers","following_url":"https://api.github.com/users/BartAdv/following{/other_user}","gists_url":"https://api.github.com/users/BartAdv/gists{/gist_id}","starred_url":"https://api.github.com/users/BartAdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BartAdv/subscriptions","organizations_url":"https://api.github.com/users/BartAdv/orgs","repos_url":"https://api.github.com/users/BartAdv/repos","events_url":"https://api.github.com/users/BartAdv/events{/privacy}","received_events_url":"https://api.github.com/users/BartAdv/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2018-02-03T23:39:22Z","updated_at":"2018-02-18T11:52:55Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nTried to build it with `--target wasm32-unknown-unknown`, haven't succeeeded. At first, I found out the dispatcher might be problematic (it's supporting parallel execution), so I went and annotated `shred` with conditional compilation directives (it already had it for `emscripted`, so I just duplicated it with analogue for `target_arch = \"wasm32\"` [here](https://github.com/bartadv/shred/tree/wasm32). It builds fine then.\r\n\r\nGoing back to `specs`, I've overriden the `shred` to use my branch:\r\n\r\n```\r\n[dependencies.shred]\r\ngit = \"https://github.com/BartAdv/shred\"\r\nrev = \"4d6b1a9c4d0bc1cd8d7bba275e7fbb4d3be69f1b\"\r\n```\r\n\r\nonly to see\r\n\r\n```\r\nerror[E0433]: failed to resolve. Use of undeclared type or module `imp`\r\n  --> /home/bart/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.3.20/src/os.rs:35:18\r\n   |\r\n35 | pub struct OsRng(imp::OsRng);\r\n   |                  ^^^ Use of undeclared type or module `imp`\r\n\r\nerror[E0433]: failed to resolve. Use of undeclared type or module `imp`\r\n  --> /home/bart/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.3.20/src/os.rs:40:9\r\n   |\r\n40 |         imp::OsRng::new().map(OsRng)\r\n   |         ^^^ Use of undeclared type or module `imp`\r\n\r\n```\r\n\r\nOK, I get that - rand crate relies on some sys stuff. So I wanted to fix whatever dep is wanting `rand`. Found out, the `rayon-core` uses it. As it turns out, `rayon` is used by `hibitset` (gated by feature flag `parallel`), so I wanted to check if I could gate the specs rayon dependncy similarily...:\r\n\r\n```\r\ndiff --git a/Cargo.toml b/Cargo.toml\r\nindex ef2a182..a979465 100644\r\n--- a/Cargo.toml\r\n+++ b/Cargo.toml\r\n@@ -23,10 +23,9 @@ derivative = \"1\"\r\n fnv = \"1.0\"\r\n hibitset = { version = \"0.4.1\", features = [\"parallel\"] }\r\n mopa = \"0.2\"\r\n-shred = \"0.5.0\"\r\n shred-derive = \"0.3\"\r\n tuple_utils = \"0.2\"\r\n-rayon = \"0.8.2\"\r\n+rayon = { version = \"0.8.2\", optional = true}\r\n \r\n futures = { version = \"0.1\", optional = true }\r\n serde = { version = \"1.0\", optional = true, features = [\"serde_derive\"] }\r\n@@ -34,9 +33,14 @@ serde = { version = \"1.0\", optional = true, features = [\"serde_derive\"] }\r\n # enable rudy via --features rudy\r\n rudy = { version = \"0.1\", optional = true }\r\n \r\n+[dependencies.shred]\r\n+git = \"https://github.com/BartAdv/shred\"\r\n+rev = \"4d6b1a9c4d0bc1cd8d7bba275e7fbb4d3be69f1b\"\r\n+\r\n [features]\r\n common = [\"futures\"]\r\n nightly = []\r\n+parallel = [\"hibitset/parallel\", \"rayon\"]\r\n \r\n [package.metadata.docs.rs]\r\n features = [\"common\", \"serde\"]\r\n```\r\n\r\n...to no avail, the build is still giving me\r\n\r\n```\r\nerror[E0433]: failed to resolve. Use of undeclared type or module `imp`\r\n  --> /home/bart/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.3.20/src/os.rs:35:18\r\n   |\r\n35 | pub struct OsRng(imp::OsRng);\r\n   |                  ^^^ Use of undeclared type or module `imp`\r\n```\r\n\r\nNow - maybe someone more compoenent than me could try and check it? Is it planned to support `wasm32-unknown-unknown` target?"},"comment":{"url":"https://api.github.com/repos/slide-rs/specs/issues/comments/366510517","html_url":"https://github.com/slide-rs/specs/issues/341#issuecomment-366510517","issue_url":"https://api.github.com/repos/slide-rs/specs/issues/341","id":366510517,"user":{"login":"torkleyy","id":23152057,"avatar_url":"https://avatars1.githubusercontent.com/u/23152057?v=4","gravatar_id":"","url":"https://api.github.com/users/torkleyy","html_url":"https://github.com/torkleyy","followers_url":"https://api.github.com/users/torkleyy/followers","following_url":"https://api.github.com/users/torkleyy/following{/other_user}","gists_url":"https://api.github.com/users/torkleyy/gists{/gist_id}","starred_url":"https://api.github.com/users/torkleyy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torkleyy/subscriptions","organizations_url":"https://api.github.com/users/torkleyy/orgs","repos_url":"https://api.github.com/users/torkleyy/repos","events_url":"https://api.github.com/users/torkleyy/events{/privacy}","received_events_url":"https://api.github.com/users/torkleyy/received_events","type":"User","site_admin":false},"created_at":"2018-02-18T11:52:54Z","updated_at":"2018-02-18T11:52:54Z","author_association":"OWNER","body":"@BartAdv It's merged ;)"}}
{"actor":{"display_login":"torkleyy"}}