-
Notifications
You must be signed in to change notification settings - Fork 260
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
Add C/C++/Rust examples to go with the wat files #9
Comments
This is a good point. We do have an article about compiling over from C++: https://developer.mozilla.org/en-US/docs/WebAssembly/C_to_wasm But there is nowhere where we show direct comparisons between source (e.g. C++) and equivalent WA, along with compilation to wasm and usage in the JS. Early next year I am intending to add a bunch of information on Rust and it's advantages over C++ in being the source of WAT/WASM. I will make this part of that initiative for sure. |
I actually am putting together an outline for a tutorial with a realistic example: passing a Unicode string from JS to C++-compiled WASM, and passing it back in chunks. The inspiration is a need I have for a XML parser. I was thinking of compiling Expat in WebAssembly. Before I can do that, I need someone to fill in some gaps on bridging C++ and JS. So, I want to provide a baseline demo project with very specific questions and a tutorial document outline. I also want to find a colleague who understands WebAssembly well enough to answer those questions and complete writing the tutorial. The tutorial will assume general familiarity with JavaScript and C++. I would provide:
The questions I want answered:
Is there anyone out there who could be an effective partner in this? |
There's also a lot of work on ergonomics and integrating into existing ESM/node workflows over in https://rust-lang-nursery.github.io/rust-wasm/. In particular, you can see mentioned in the README.md that one of the goals of that project is a small book documenting the whole workflow and I see a lot of active work on that in my GH notifications. |
Hi, I was wondering if there was any follow-up? |
No, sorry, life got in the way of my ambitions. Again. |
May I ask you a question? |
You'll have to ask someone else. I really haven't done any WebAssembly work at all. This ticket was supposed to be a way into that for me. |
Hey, @HackerWand. if you're still interested in an answer to that: you would use C's |
I'm not sure if this is the right place for this, but it would definitely help a lot in understanding how these parts fit if we had a C/C++/Rust (at least one) version of the examples.
The text was updated successfully, but these errors were encountered: