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

Building on top of wasm-bindgen? #318

Closed
alexcrichton opened this issue Jan 10, 2019 · 15 comments
Closed

Building on top of wasm-bindgen? #318

alexcrichton opened this issue Jan 10, 2019 · 15 comments

Comments

@alexcrichton
Copy link

This topic has come up from time to time, but I'd be curious if it'd be good to make this official? Would stdweb be up for officially moving in the direction (eventually) of building on top of wasm-bindgen?

If so, I'd be more than willing to help fill out more information and work with y'all to make sure we can handle everything. We mentioned during the last rustwasm working group meeting that I'd meet with @Pauan and have some discussion on Discord, but I wasn't able to reach them just afterwards :(. In any case, if this sounds like a good idea, it's probably best to close this an open a more official tracking issue next.

@Pauan
Copy link
Contributor

Pauan commented Jan 13, 2019

(I was able to get Discord working, so that's not a problem anymore)

@TitanThinktank
Copy link

Lets hope cargo web dont get infected by node npm or webpack, it was a hell in wasm bingen to get around it, now i am counting on stdweb for true web programming in Rust.

@koute
Copy link
Owner

koute commented Jan 24, 2019

I apologize for the late reply; I was completely away for the last two weeks.

This topic has come up from time to time, but I'd be curious if it'd be good to make this official? Would stdweb be up for officially moving in the direction (eventually) of building on top of wasm-bindgen?

Yes! I'll try to catch up on the recent discussions and try to push something forward from our side.

Lets hope cargo web dont get infected by node npm or webpack, it was a hell in wasm bingen to get around it, now i am counting on stdweb for true web programming in Rust.

You might be slightly overexaggerating, but don't worry. (: I intend to keep the current cargo-web workflow for those people who currently want to keep using it. (This also includes Emscripten compatibility where I do intend to keep stdweb compatible with Emscripten as there are people who use/want that.)

No loss of functionality is planned, just extra compatibility with wasm-bindgen.

@luover
Copy link

luover commented Feb 26, 2019

@newpavlov
Copy link

Any updates on this? It would be nice to remove stdweb feature in getrandom.

@koute
Copy link
Owner

koute commented Apr 7, 2019

I've just added initial support for wasm-bindgen on master; see this for a working example. It's still not fully working though, mainly due to this issue:

rustwasm/wasm-bindgen#1427

@newpavlov Even though stdweb will be compatible with wasm-bindgen there are still people who do not use wasm-bindgen. Some people use Emscripten (which stdweb fully supports), and some people target wasm32-unknown-unknown through cargo-web (so without going through wasm-bindgen). It's of course completely up to you if you want to support those.

@alexcrichton
Copy link
Author

Great news! Thanks for pushing on this @koute!

Feel free to ping us or open issues for anything missing as usual, and sorry for not implementing the function table sooner, that was a mixup for sure!

@koute
Copy link
Owner

koute commented Apr 14, 2019

@alexcrichton Thanks for the swift response!

Okay, in theory everything should work now on the current master! Unfortunately I still haven't ran the test suite under wasm-bindgen due to rustwasm/wasm-bindgen#1458, so I can't guarantee that everything isn't actually horribly broken. (: It'd be nice to get that sorted out, or at least figure out some sort of a temporary workaround.

I've also made wasm-bindgen the default when not using cargo-web, so it should work out-of-box without having to enable any extra features.

@alexcrichton
Copy link
Author

Okay, in theory everything should work now on the current master!

Nice!

It'd be nice to get that sorted out, or at least figure out some sort of a temporary workaround.

Definitely! I've commented on the issue and I think we can make good progress soon on it

I've also made wasm-bindgen the default when not using cargo-web, so it should work out-of-box without having to enable any extra features.

Also nice! Thanks again so much for all your work on this!

I think this is basically all implemented now, so closing.

@koute
Copy link
Owner

koute commented Apr 15, 2019

Released as 0.4.16!

@TitanThinktank
Copy link

This guy Nick Fitzgerald, needs to mention stdweb in his blog instead of making claims of inventing something better without even a trace about it.
"In 2018, we made using all of these things possible in that you can access the underlying JavaScript and Web APIs directly via wasm-bindgen, js-sys and web-sy, but this is equivalent to programming against the libc crate directly. In 2019, we should create higher-level abstractions that wrap the raw, underlying API to yield a better experience that is ultimately more practical"
http://fitzgeraldnick.com/2018/12/14/rust-and-webassembly-in-2019.html

@koute
Copy link
Owner

koute commented Apr 27, 2019

@TitanThinktank I appreciate your enthusiasm and support, but please refrain from such remarks in the future. Any form of personal attacks, shaming or disrespect towards other members of the community will not be tolerated. Everyone's welcome to voice their opinion, but there are always ways to voice it without being rude.

@TitanThinktank

This comment has been minimized.

@koute
Copy link
Owner

koute commented Apr 27, 2019

@TitanThinktank I'm sorry, but this is your last warning. I don't believe in censorship, so I won't delete what you wrote, but if you keep being an asshole I will be forced to block you. Again, if you want to criticize something you're free to do so, but this is not a constructive way to do so.

@ghost
Copy link

ghost commented Apr 27, 2019

It would also be common courtesy to notify @fitzgen.

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

No branches or pull requests

6 participants