Folkert de Vries
folkertdev@hachyderm.io
Posts
-
View post
rustc_codegen_gcc can now define c-variadic functions https://github.com/rust-lang/rustc_codegen_gcc/pull/906 Involved more work in our GCC fork than expected but it seems to work now. #rustlang
-
View post
Finally, it's done! C-variadic function definitions will be in rust 1.99.0 https://github.com/rust-lang/rust/pull/155697 I started working on this ~ a year ago, it tooks dozens of PRs and many hours of staring at Clang/LLVM source and assembly. The tracking issue is from 2017, and now it's finally here. #rustlang
-
View post
My weekend project: a version of abi-cafe (by @Gankra) that can cross-compile and run under qemu. That makes it much easier to find ABI-bugs across targets: https://github.com/folkertdev/abi-cafe#cross-compilation This is a bit of a "disappointing facts about clang" generator, but hopefully we can get the ABI bugs fixed. Several fixes for mips and sparc have already been merged. I'd also love it if someone more competent at CI stuff could make some sort of report ou...
-
View post
I'm working on a rust complex number type that is ABI-compatible with its C counterpart. Here is an initial status update: https://github.com/rust-lang/goals/issues/761#issuecomment-5387788008 If that's something you have a use for, please reach out. Now you might wonder what could be so hard about this, it's just a struct with two fields. True, but many ABIs have come up with some creative ways of passing these things around. And clang and gcc sometimes disagree(d) on...
-
View post
Two more project goal updates on unstable floating point types: on f128 and c_longdouble https://github.com/rust-lang/goals/issues/701#issuecomment-5451165421 and f16 https://github.com/rust-lang/goals/issues/655#issuecomment-5451542912 #rustlang
-
View post
A long-standing (embedded) rust bug has finally been fixed: global assembly now knows about globally-enabled target features https://github.com/rust-lang/rust/pull/160594 Before you could get weird LLVM errors saying that a target feature was not enabled while it clearly was. @nikic added the ability to attach target features to assembly blocks in LLVM 23, and now it's been hooked up in rustc. #rustlang #llvm
-
View post
I'm on the 1.99.0 changelog episode talking about stabilizing c-variadic functions https://www.youtube.com/watch?v=SLV9AJxnb1U The tracking issue for this feature is from 2017, I started working on it after the 2025 all hands, and 1.5 years later it's finally stable! #rustlang
-
View post
The unstable Complex number type is now ABI-compatible with C on all targets https://doc.rust-lang.org/nightly/core/num/struct.Complex.html So, the hard work is done, though that the docs page needs some examples https://github.com/rust-lang/rust/pull/164315 of course the last holdout was ppc32 (my nemesis) #rustlang
-
View post
In Frisian, when someone is not feeling well, you can wish them (to experience) bettership, i.e. the opposite of hardship. Frustratingly this is not common in English and using it sounds like you want someone to have an improved boat. https://en.wiktionary.org/wiki/bettership
-
View post
I too will be at #RustWeek Come watch my talk on stabilizing features: https://2026.rustweek.org/talks/folkert/ And I'm happy to chat about my work on c-variadic functions, guaranteed tail calls, zlib-rs, SIMD, and any other low-level shenanigans #rustlang
-
View post
It's not in the 1.96 release blog post, but if you happen to have a mainframe in the basement you can now use vector registers in inline assembly on s390x https://github.com/rust-lang/rust/pull/154184 The total number of users that will ever use that is probably roughly zero, but it's satisfying to tick off this sort of thing. #rustlang
-
View post
On rust nightly you can now cfg on the current object format https://github.com/rust-lang/rust/pull/155126 This is useful for e.g. selecting the right section name for #[link_section = "..."] and more generally for inline assembly and linker shenanigans. #rustlang
-
View post
@david_chisnall weird, I've updated the link to a different viewer, does that work?
-
View post
@pinskia I mean yeah, it's unfortunate. It's the only (remaining) ABI issue for f16 in rust.
-
View post
The `cfg_select` macro is finally stable in today's rust 1.95 release https://blog.rust-lang.org/2026/04/16/Rust-1.95.0/ It's a flexible way of picking an implementation based on information known at compile time, like the current target or a cargo feature. I worked on the implementation of this macro in the compiler and pushing for its stabilization (updating tests, docs, the reference, etc.) #rustlang
-
View post
I wrote about some rustc compiler contributions that derive from our low-level systems work https://trifectatech.org/blog/fixing-our-own-problems-in-the-rust-compiler/ Also it's already out of date, because with https://github.com/rust-lang/miri/pull/4912 that got merged earlier today we will soon be able to run our AArch64 SIMD tests with miri. #rustlang
-
View post
I helped with shaving some instructions from isfinite and similar float functions on a variety of platforms (notably aarch64): https://github.com/llvm/llvm-project/pull/169402 This inefficiency was first reported on the rust issue tracker, then nerdsniped some LLVM folks, and I did the boring but necessary work of actually landing the change. #llvm #rustlang
-
View post
Reading about the Russian conquest of central Asia
-
View post
An excellent time to listen to my favorite Hungarian band, Thy Catafalque https://www.youtube.com/watch?v=KnAq5dFHE9o&t=811s Technically a one-man project, but live it has 4 vocalists, and a huge variety of sounds, e.g here they go from harsh vocals to a cello section from one song to the next. It's really neat.
-
View post
The rust flate2 crate will make zlib-rs the default soon https://github.com/rust-lang/flate2-rs/pull/542 Making zlib-rs the default is a free performance boost for the rust ecosystem. You can always switch back to the old default of miniz_oxide if you do encounter issues (though please let us know if you do, we should fix those!) #rustlang
-
View post
Rust should have guaranteed tail calls (but it's complicated). I did a deep dive on why tail calls are useful in low-level libraries, current blockers for stabilization that we know about, and what we can do to fix them: https://trifectatech.org/blog/tail-calls-project-goal/ @wffl and I submitted a project goal to make progress on this niche but important feature. #rustlang
-
View post
I've implemented a `simd_splat` intrinsic, a function that puts the same value in each SIMD lane. LLVM wasn't handling the previous workaround (a manual shuffle) very well. https://github.com/rust-lang/rust/pull/151346 the intrinsic is now used by stdarch and portable_simd: - https://github.com/rust-lang/stdarch/pull/2003 - https://github.com/rust-lang/portable-simd/pull/501 This intrinsic fixes a bunch of long-standing optimization issues, and appears to have sped up compile...
-
View post
Niche rust feature now on nightly: carryless multiplication https://github.com/rust-lang/rust/pull/152132 This operation is useful in some cryptography and checksum algorithms, as well as e.g. simdjson. #rustlang #llvm
-
View post
@harold we experimented with something like that, but the fallback is only really used during const evaluation and with the cranelift/gcc backends. So for now at least we picked the simple implementation in those cases, and trust that LLVM will normally provide something more efficient.
-
View post
Miri and const-eval can now execute c-variadic functions https://github.com/rust-lang/rust/pull/150601 That's the last major technical hurdle for c-variadic functions. Time to stabilize this thing! #rustlang
-
View post
@artagnon did lowering to the platform-specific instructions not make it into LLVM 22? On x86 the relevant PRs are from after the cutoff, but I thought that riscv at least made it in but can't get that to work https://godbolt.org/z/Ercb7cMbE
-
View post
@artagnon that's unfortunate, our internal cleanups will have to wait for LLVM 23 then
-
View post
The message on an invalid target feature now suggests the most similar valid target feature names, for when it's been a while and you can't quite remember the exact target feature name. https://github.com/rust-lang/rust/pull/153966 You can often make improvements like this by pattern matching on the surrounding code, you should give it a go when there are errors you run into that could be more helpful. #rustlang
-
View post
The cfg_select! macro is now stable, and will be part of rust 1.95. https://github.com/rust-lang/rust/pull/149783 This is a builtin replacement for cfg_if, and is really effective at cleaning up complex configuration logic. #rustlang