Tweede Golf Blog
tweedegolf.nl · Company blog · on HN since 2020
Tweede Golf, a Dutch software company, writes about Rust in embedded and systems software, including async Rust, sudo-rs and fuzzing.
What HN saysCommenters find its posts on dependency reduction in sudo-rs a great read and discuss its views on embedded async Rust and memory safety.
38HN people shared it
10linked it in comments
50stories submitted
605story points
6 months agolast shared
2020people per year2026
Most-shared posts
- 1Embedded Async Rust destroys RTOS on ergonomics (and on everything else)7 people · 10 points · first shared 2022 · 1 comments on HN
- 2Does using Rust make your software safer?4 people · 30 points · first shared 2025 · 6 comments on HN
- 3Sudo-rs dependencies: when less is better3 people · 101 points · first shared 2024 · 57 comments on HN
- 4The Hunt for Error -223 people · 74 points · first shared 2025 · 25 comments on HN
- 5What is my fuzzer doing?3 people · 5 points · first shared 2025 · discussion on HN
- 6Debloat Your Async Rust3 people · 5 points · first shared 2026 · discussion on HN
- 7Exception Handling in Rustc_codegen_cranelift3 people · 5 points · first shared 2025 · discussion on HN
- 8Why Rust is a great fit for embedded software – 2023 update3 people · 4 points · first shared 2023 · 1 comments on HN
- 9Rust is rolling off the Volvo assembly line2 people · 140 points · first shared 2024 · 99 comments on HN
- 10Async Rust never left the MVP state2 people · 44 points · first shared 2026 · 2 comments on HN
- 11Sequential-storage: efficiently store data in flash2 people · 2 points · first shared 2024 · discussion on HN
- 12Dealing with Dependencies in Rust2 people · 2 points · first shared 2024 · discussion on HN
- 13Translating Bzip2 with C2rust2 people · 1 points · first shared 2025 · discussion on HN
- 14Rust Needs an Official Specification1 people · 55 points · first shared 2024 · 47 comments on HN
- 15Build your own async primitive1 people · 51 points · first shared 2020 · 14 comments on HN
What HN people wrote when they linked it
jrpelkonen · 2025-11-02
Fil-C is an innovative approach and a great technical achievement. However, I wouldn't suggest that it is an universal solution without caveats. For instance, the performance penalty of up to 4x is not acceptable in a lot of cases.
Also, the c2rust output is rough but not hopeless: There are real world success stories of rust projects that were bootstrapped via c2rust, e.g. https://tweedegolf.nl/en/blog/151/translating-bzip2-with-c2rust
sea-gold · 2024-03-07
This was a great (and short) read.
> Over the course of a few months we carefully removed almost all of our dependencies, ending up with only three crate dependencies required for the current version. Those crates are libc, glob, and log. All three of them are being maintained under the rust-lang github organization, indicating that they are very much at the core of the Rust ecosystem.
That is impressive!
I also learned about a few other neat things:
- The Tweede golf blog[1] which has lots of great content on Rust (example[2])
- cargo-depgraph[3]
[1] https://tweedegolf.nl/en/blog/
[2] https://tweedegolf.nl/en/blog/104/dealing-with-dependencies-in-rust
[3] https://github.com/jplatte/cargo-depgraph
sshine · 2025-01-30
> Async Rust (by default) can allocate memory
For bare-metal Rust firmware, you would always use no-std, which excludes a default allocator.
I understand from what you're saying that the principal difference between embassy-rs and what you'd expect from an RTOS is the choice of scheduling; as far as I can see, embassy-rs'es cooperative scheduler is even defended as highly intended.
The advantage of cooperative scheduling is that you don't need threads and context switching, since every yield gives control to the next task. And, as you say, the downside is that you can't reason about when yielding happens, so you can only hope that tasks yield often.
> interrupt executor [...] essentially ties each task to a dedicated interrupt, and AFAICT requires that all high-priority work must happen in interrupt context.
Hmm, that seems bad.
And how so is RTIC disqualified? It seems not classically preemptive.
https://rtic.rs/2/book/en/#rtic---the-past-current-and-future
https://interrupt.memfault.com/blog/embedded-async-rust#cooperative-vs…
https://tweedegolf.nl/en/blog/65/async-rust-vs-rtos-showdown
epage · 2024-11-08
Context: maintainer of clap, a Cargo team member
Regarding the CLI parser
> This will take in our arguments (from something like std::env::args) and return our matches, or an error.
`std::env::args` will panic on non-UTF8 content, like a file path. You could instead error on non-UTF8 content. Until recently, you had to pull in a dependency or reinvent some non-trivial stuff to properly deal with `OsStr`s. There are now `unsafe` functions for dealing with them. I'd like to extend things further to have a proper "pattern" API for `OsStr` which would allow almost everything a CLI parser needs to deal with `OsStr` without a dependency and without `unsafe`.
---
Regarding the discussion on dependencies, I think there are reasonable and valid situations to be careful of adding dependencies (see https://tweedegolf.nl/en/blog/119/sudo-rs-depencencies-when-less-is-be… and the follow up https://www.reddit.com/r/rust/comments/1b92j0k/sudors_dependencies_whe… but the reasoning here focuses on the wrong things imo.
> That would add 23 dependencies to my little project, if you count transitive dependencies. This can go up higher if you turn on a few features: derive, env, unicode, and wrap_help bring you up to 38 dependencies!
People overly focus on dependency counts. Yes, they mention dependency counts aren't a meaningful metric later but the lack of nuance here suggests they've not internalized that, including talking about the impact of optional…
rnijveld · 2024-06-25
I agree that amplification and reflection definitely are worries, which is why we are working towards NTS becoming a default on the internet. NTS would prevent responses by a server from a spoofed packet and at the same time would make sure that NTP clients can finally start trusting their time instead of hoping that there are no malicious actors anywhere near them. You can read about it on our blog as well: https://tweedegolf.nl/en/blog/122/a-safe-internet-requires-secure-time
One thing to note about amplification: amplification has always been something that NTP developers have been especially sensitive to. I would say though that protocols like QUIC and DNS have far greater amplification risks. Meanwhile, our server implementation forces that responses can never be bigger than the requests that initiated them, meaning that no amplification is possible at all. Even if we would have allowed bigger responses, I cannot imagine NTP responses being much bigger than two or three times their related request. Meanwhile I've seen numbers for DNS all the way up to 180 times the request payload.
As for your worries: I think being a little cautious keeps you alert and can prevent mistakes, but I also feel that we've gone out of our way to not do anything crazy and hopefully we will be a net positive in the end. I hope you do give us a try and let us know if you find anything suspicious. If you have any feedback we'd love to hear it!
bschwindHN · 2026-01-09
Here's a good technical writeup on latency and jitter (latency standard deviation) for interrupts when it comes to Embassy, FreeRTOS, and RTIC:
https://tweedegolf.nl/en/blog/65/async-rust-vs-rtos-showdown
Obviously if you're working on something truly hard real-time you probably wouldn't be reaching for these tools to begin with, but for the average embedded project it seems you will enjoy quite good latency and jitter characteristics by default.
pjmlp · 2025-10-26
It is surely a problem given the cumulative time everyone waits compiling them distributed across Rust users.
Also if it wasn't a problem, articles like this wouldn't exist,
https://tweedegolf.nl/en/blog/104/dealing-with-dependencies-in-rust
iknowstuff · 2024-08-22
But also avoiding the cost of context switching, and the ability to handle many tasks in embedded environments.
https://tweedegolf.nl/en/blog/65/async-rust-vs-rtos-showdown
morning-coffee · 2023-10-05
> I worked in embedded space for years. Rust does not suit that environment.
It seems to be getting better though. For example...
https://tweedegolf.nl/en/blog/65/async-rust-vs-rtos-showdown
childintime · 2022-07-15
Exciting indeed, as this is a high quality effort. What gets me most excited is the async work being done around Embassy, which has the potential to revolutionize bare-metal programming once it graduates to stable. The cool-aid:
- https://embassy.dev/
- https://tweedegolf.nl/en/blog/65/async-rust-vs-rtos-showdown