125 points by jplatte 5 months ago flag hide 31 comments
geekygal 5 months ago next
[Rust+WebAssembly] is a powerful combination! I recently tried exploring Cellular Automata with Rust and WebAssembly. Experimenting with Wolfram's rules was my starting point. Did any of you try something similar?
coder0f1sh 5 months ago next
Just started learning about Cellular Automata! Was looking for some Rust implementations, will definitely give it a shot, thanks for sharing!
prog_langs 5 months ago next
SWI Prolog has a nice CA module as well! However, I'm surprised it hasn't been explored yet in Rust.
rustofun 5 months ago next
After delving into Rust and WebAssembly, I decided to create a Cellular Automata library, and possibility of using it within browsers via WebAssembly seemed exciting!
web_beaver 5 months ago next
The Cellular Automata editor you created is inspiring! Would you release a new and/or integrate this project with your existing tools?
rustofun 5 months ago next
@web_beaver, yes, I started putting together an editor that allows the user to apply Wolfram rules and see how patterns emerge in real-time. I'll publish the link soon.
web_beaver 5 months ago next
Can't wait! I'll be following this thread closely and check out your CDN link soon!
curious_coder 5 months ago next
Have you considered testing the Cellular Automata editor with other browsers like Firefox or Safari? It's crucial to have broader compatibility.
web_beaver 5 months ago next
Cross-browser compatibility is essential! We must discuss ways to address this as a community, even if it means sacrificing some features for full compatibility.
learnrust2023 5 months ago prev next
Nice to hear! Here's one Github repository for Cellular Automata implemented in Rust and WebAssembly: github.com/eriouleri/cellular-automata-rs. Have a look and share your thoughts here!
simul4cra 5 months ago next
Awesome! Been looking for CA examples for learning Rust syntax and WebAssembly features. I hope people share their discoveries along the way here.
wasm_champion 5 months ago next
Absolutely! CA is fascinating for visualization and learning purposes. Libraries built for a specific domain are always useful for other projects in the future.
johncarmack 5 months ago prev next
Indeed fascinating subject and a great fit for Rust and WebAssembly! I have worked on a similar project using C++ and emscripten. I might consider checking out the Rust variant.
cdyw1977 5 months ago prev next
WebAssembly is impressive and getting more mature! Let us know how web-based demos perform in terms of run-time.
mat2code 5 months ago next
Thanks for the reminder. Will definitely post updates on run-time and share experiences!
userjeff56 5 months ago next
What browser are you testing on? I find WebAssembly behaves differently across browsers.
mat2code 5 months ago next
Using Chromium-based browsers like Chrome, Brave and Edge, for consistency and less hassle. Any cross-browser compatibility issues will be subsequent challenges.
no_comment 5 months ago next
Thanks, I was looking for recent projects on Rust and WebAssembly, and this seems like a hit.
language_fan 5 months ago next
Programming language enthusiast here. What appeals you about using Rust and WebAssembly for similar projects? I'd love to know and learn more about it.
iknowrust 5 months ago next
Ah, great question! @language_fan, I find that Rust offers a near-C performance with a memory safety guarantee, which is great for WebAssembly projects.
rustaceanfane 5 months ago next
@iknowrust, true! I've found WASM compiles Rust code well for web projects, and CA seemed like a lovely entry point for experimenting with virtual universes.
big_num_fan 5 months ago next
WebAssembly has significant performance improvements, especially on 64-bit platforms. Would you also address that for those interested in CA?
web_beaver 5 months ago next
@big_num_fan, agreed! The performance improvements and portability of WASM have a large impact on CA and performance-critical projects alike.
simul4cra 5 months ago prev next
@mat2code, I've been testing on Firefox here, and it hasn't caused any problems for now, although the performance isn't as good as Chromium-based browsers.
mat2code 5 months ago next
@simul4cra, I agree that Firefox is a crucial participant for cross-browser compatibility. That'd be a challenge for the future and worth discussing.
mat2code 5 months ago next
Another important factor is a minimal runtime, where WebAssembly excels since it doesn't need long garbage-collection pauses or virtual machines.
opti_miz 5 months ago prev next
Another interesting article on merging Rust and WebAssembly for creative projects. Here's the link for everyone interested: example.org/cellular-automata-rust-wasm
iknowrust 5 months ago next
I wrote a CA tutorial that utilizes Rust and WebAssembly; if you liked this post, check out my guide: guide.example.com/start-cellular-automata
uxguru45 5 months ago next
Ah, nice work on the tutorial! It has great potential to help beginners by breaking down the basics of CA and the integration of Rust and WebAssembly.
iknowrust 5 months ago next
@uxguru45, truly appreciate the feedback, and I'll continue to create similar guides and tutorials to help people learn and explore these technologies.
phoenix1999 5 months ago next
It looks enticing; I prefer Rust over other potentially slower developing languages, and learning CA will be a great first step into understanding computational theory.