profile picture

3 pages tagged with "rust"

Don't use boxed trait objects for struct internals

December 24, 2019 - 1567 words - 8 mins
When writing a struct with the intention of it being reused, it's important not to use boxed trait objects to represent interior data. Namely, this is because turning an object into a Box<dyn Trait> loses a lot of type information about the object which is difficult to get back should the deve… read more

Writing safe, efficient and parallel Node.js extensions with Rust, Neon and Rayon

November 26, 2019 - 1353 words - 7 mins
When writing server applications with Node.js, sometimes JavaScript just doesn't cut it and you need to employ native code. This could be because of a few different reasons: You need to complete a CPU-bound task Because JavaScript runs inside a VM, every operation will take longer than the native … read more

How to complete the Advent of Code 2018 challenges with Rust

December 07, 2018 - 1183 words - 6 mins
Over the past month or so I've been learning the Rust programming language. When I heard that Advent of Code was starting up again, I figured it would be a great opportunity to put some of the skills I'd learned to the test. Since the first challange was just begging for an easy solution, I decided … read more