Yew: wasm32-unknown-unknown build failed

Created on 12 Jan 2018  路  11Comments  路  Source: yewstack/yew

Add http crate break target wasm32-unknown-unknown build

screen shot 2018-01-12 at 17 07 00

Should be upstream bug?

95

Most helpful comment

The referenced PR to iovec has landed. I'm playing around with yew master branch and, while I used to need machineloop's fork to build, I don't anymore.
yewmaster

All 11 comments

Yep. The iovec crate checks for #[cfg(unix)] and #[cfg(windows)], and since the wasm32-unknown-unknown doesn't define either the sys namespace is empty.

Although I'm not sure what would be the point of using iovec on a target which has no use for it, so perhaps an issue should be raised in the crate which depends on the iovec?

Might be worth reverting https://github.com/DenisKolodin/yew/pull/95, while we wait for upstream fix.

Ok, I'll revert the first version of service and hide the current fetch under feature.

When I test things out with the iovec PR mentioned above, using [replace] in an example project cargo.toml

[replace]
"iovec:0.1.1" = { git = 'https://github.com/dflemstr/iovec', branch = 'wasm-support' }

I get the following errors in bytes:

screen shot 2018-01-15 at 4 58 05 pm

@machineloop You can't [replace] iovec 0.1.1 with its git master. There was a breaking change to remove the From<[u8]> impls that will be released with a version-bump eventually.

Thanks @Arnavion, I didn't realize there were breaking changes that hadn't been cut into an IoVec release. I took the proposed Wasm support and cherry picked the commits onto the last stable release in a fork, see the PR here: https://github.com/DenisKolodin/yew/pull/110

How is the status on this bug here?

@Roba1993 I think this fix is probably waiting for an IoVec release.
https://github.com/carllerche/iovec/pull/13

The referenced PR to iovec has landed. I'm playing around with yew master branch and, while I used to need machineloop's fork to build, I don't anymore.
yewmaster

Yes, confirmed. There is no more errors after cargo update.
I'll close this issue since the upstream is patched.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wldcordeiro picture wldcordeiro  路  4Comments

jstarry picture jstarry  路  4Comments

nixpulvis picture nixpulvis  路  4Comments

DenisKolodin picture DenisKolodin  路  5Comments

kellytk picture kellytk  路  4Comments