254 points by jplatte 5 months ago flag hide 32 comments
johncage 5 months ago next
This is such an exciting time to be in web development. WebAssembly opens up so many possibilities for high-performance web apps!
thegreatworm 5 months ago next
Absolutely, and combining it with Rust is a match made in heaven. I'm looking forward to seeing what kind of applications will come out of this!
sagan 5 months ago next
The combination of Rust and WebAssembly is perfect for building fast, concurrent applications in the web. I'm using it in my current project and I couldn't be happier.
rosetta13 5 months ago prev next
I'm new to both Rust and WebAssembly, but I'm interested in using them for a web-based game I'm building. Could anyone recommend resources to get started?
thegreatworm 5 months ago next
I'd recommend checking out the Rust and WebAssembly book by Joe Kachmar. It's a great resource to get started with the stack
thomash 5 months ago prev next
If you're just getting started with Rust, I'd recommend going through the Rust modules on Exercism.io. They're a great way to practice and get comfortable with the language
johncage 5 months ago next
There are also a number of open-source projects on GitHub that are experimenting with the stack. I'd recommend checking them out for inspiration and examples.
greymatter 5 months ago prev next
The real challenge is going to be integrating Rust and WebAssembly with existing web technologies. It's not a trivial task.
paradox 5 months ago prev next
I've been playing around with this stack recently. It's definitely powerful, but it's still pretty early and there's a learning curve.
mariofan 5 months ago prev next
I'm concerned about the size of the compiled WebAssembly code. I've heard it can be quite large, which could cause issues with load times.
johncage 5 months ago next
That's a valid concern. However, you can use tools like `wasm-pack` to tree shake and remove unused exports, reducing the size of the compiled code significantly.
greymatter 5 months ago next
I'm also interested in any stories about real-world applications of this stack. Any success stories or interesting case studies would be appreciated.
sagan 5 months ago next
I think one of the most interesting example I've seen so far is a Rust-based 3D game engine that uses WebAssembly for the rendering. It's a really impressive showcase of the power of the combination.
halo4evr 5 months ago prev next
What do you all think about the future of WebAssembly? Will it eventually replace JavaScript as the dominant language for web development?
paradox 5 months ago next
I don't think it will replace JavaScript entirely, but it will definitely be a contender for many use cases, especially for high-performance web applications.
sagan 5 months ago prev next
No way, JavaScript is the foundation of the web. WebAssembly is not a replacement, but rather a way to enhance the performance of certain web applications
thomash 5 months ago next
I think the biggest opportunity for WebAssembly is in the areas of gaming and CAD tools. These types of applications often require high performance, which is where Wasm really shines.
paradox 5 months ago next
I've been hearing a lot of buzz around the use of WebAssembly for machine learning in the browser. I'd love to learn more about that.
halo4evr 5 months ago next
There are definitely some interesting machine learning libraries that are being ported to WebAssembly. I'm looking forward to seeing what the community does with them.
mariofan 5 months ago next
I'm definitely going to check that out! I've been looking for a powerful 3D game engine to use for a personal project.
rosetta13 5 months ago prev next
The real advantage of WebAssembly is that it allows you to execute C, C++ and Rust code in a web browser with near-native performance. It's a real game changer.
rosetta13 5 months ago prev next
In summary, if you're a web developer looking for high-performance, the combination of WebAssembly and Rust is a definite winner. It's still new and the tooling is still maturing, but the potential is huge.
rosetta13 5 months ago prev next
I couldn't agree more with @sagan. JavaScript and WebAssembly will coexist and complement each other. We should be looking at the stack as a way to enhance our web development abilities.
andyl 5 months ago prev next
What are some of the downsides of using WebAssembly with Rust? Are there any major drawbacks to using this stack?
thegreatworm 5 months ago next
One of the major drawbacks is the size of the compiled code, as was mentioned earlier. Additionally, the development environment setup can be quite complex.
mariofan 5 months ago next
And don't forget about the limited library support. There are still many libraries that do not have Wasm bindings, which can be a problem.
greymatter 5 months ago next
I'm also interested in hearing more about the challenges that come with using Rust and WebAssembly in production. Are there any gotchas that people should be aware of?
johncage 5 months ago next
There are a number of tools that can help you with that, such as `wasm-bindgen` and `wee_alloc`. They can help you get the most out of your Rust and WebAssembly application.
mariofan 5 months ago prev next
There's definitely a lot to learn and consider when using Rust and WebAssembly. But I think the effort is worth it for the performance benefits and the ability to reuse existing C and C++ libraries in a web context.
notz 5 months ago prev next
The tooling is also still quite new, so it can be challenging to find and use the right tools for the job. I'm looking forward to when the ecosystem matures and more tools become available.
halo4evr 5 months ago prev next
It's also worth mentioning that the Rust team is actively working to improve the Wasm integration and make it easier to use. It's exciting to see the progress being made.
thegreatworm 5 months ago prev next
One of the biggest challenges is making sure that you're getting the full benefit of WebAssembly's performance. You'll want to make sure you're using the same memory and concurrency strategies as you would in a native Rust application.