Building Plain Old Data from Scratch


I made an interesting discovery in Rust last weekend while messing with postcard:

enums are the only "plain" data type (I'm aware of) in Rust that you can't build "from scratch". When I say "from scratch", I mean using unsafe methods to manually initialize each field, say in a MaybeUninit, then call assume_init().

There are other "complex" data types, like trait objects, you can't necessarily build from scratch, but these are rarely relevant when serializing and deserializing. Even items on the heap can generally be built "in place" using various unsafe methods.

discuss on /r/rust

...read more

Thoughts on Postcard and writing a network protocol


ℹ️ These are misc notes and thoughts towards figuring out to handle the diverse transports that postcard-rpc may traverse. As of 2024-05-14, USB is the most robustly supported transport, but we'll want to expand this to support serial transport, and particularly support cases where one side (the client) isn't necessary on a std based OS.

One way to approach this is the traditional-ish OSI or TCP/IP layered model (flavored in my personal opinion):

  • application
  • postcard-rpc
  • postcard
  • flow control, error detection, acks - FACED
  • framing
  • wire control
...read more

Chats with James 016 - Scott Mabin


James talks with Scott Mabin about how he joined the Espressif team and got involved in embedded Rust, the working culture in chip manufacturing companies and preferences about designing and building mechanical keyboards.

This episode was recorded on November 8th, 2023.

...read more

Chats with James 015 - Manish Goregaokar


Another episode is coming from the archives, originally recorded in May 2022 with Manish Goregaokar as the guest- James and Manish touch on many topics, including: internationalization of languages, zero-copy deserialization in Rust, speedrunning video games and Vaccinate CA.

Originally recorded on 2022-05-09

...read more

interrupts is threads


A simple tattoo that says "shrimps is bugs"

credit: /u/Lewbular on /r/tattoodesigns

I love the tattoo "shrimps is bugs" because it is both absurd, and mostly true. Technically shrimps are not bugs, but they share a lot of qualities.

In the same way, I'd like to assert interrupts is threads.

...read more
< < Back | Next > >