Reading Time Is Over
81 Days Until I Can Walk
Ok, I’ve finished reading the Rust and WebAssembly book. It wasn’t as deep as I had hoped, but I think I have a somewhat high level overview of using WebAssembly with Rust. At the very least, I’m happy to start coding the engine tomorrow.
The last few days have felt a lot like drinking from the fire-hose of knowledge, but here are my impressions at this stage.
Rust is definitely an interesting language, and I’m very excited to start working with it. I think many of the things that the compiler enforces are things that I am aware of when I’m writing C. In general I do my best to write “good code”, but it will be different to have the compiler involved so directly in the safety of my applications. I am curious to see how well I can handle working with lifetimes, and it will take me a while to adjust to the concept of ownership. But the language syntax itself feels familiar, and I’m confident that I will be quite comfortable with it by the end of this project.
I really like the whole Rust ecosystem – the use of cargo for project and package management, the standardisation of project layout, publishing packages to crates.io, etc. At this early stage, I really feel like I have plugged into “something” and with a little bit of practice I might become a real contributor to the community. The door is wide open, and the people are welcoming.
Over the next week I would like to join some Discord servers, or possibly some reddit threads where I can interact with other Rust devs. This will also help me to advertise Fourteen Screws a little bit, of course. It’s very quiet in here at the moment 😅
I am less confident about WebAssembly. This is in part because I found Rust and WebAssembly to be much too shallow a read. In fact, I’m actually a little inspired to turn this Fourteen Screws project into a Rust/WebAssembly tutorial after I have built the engine. My lack of confidence is in my own ability to work with WebAssembly, rather than WebAssembly itself. WASM is obviously a valuable tool, but I feel like I barely have a passing knowledge of how it works, even after spending today reading tutorials.
While I was reading the documentation for wasm_bindgen I found an example project which implements ray casting. This is extremely useful! My head is a little melted at this point, however. So I’m going to wrap up for now, and first thing tomorrow I’ll dive back in with that project. I’m hoping that by the end of tomorrow the /engine/ endpoint on this site will be displaying something. Even if it is just a random texture.
Finally, I have started working through Tim McNamara’s Rust Course. The course is currently in week 2, so I’m playing catch-up, but that won’t take long. It looks like there will be some interesting projects to do during the course. I might use them as a break from the engine project, just to help reset the brain a bit. I figure working through the material on weekends is probably a good shout.
Before the end of this week, I would also like to write a more long-form, explanatory post for this site about Rust and WebAssembly. I feel like that will help me to be more effective when writing my own project. I’m going to aim to deliver that article by Friday (June 9th).