External Publication
Visit Post

[ANN] Rivulet Window Manager

Haskell Community [Unofficial] April 14, 2026
Source

Rust FFI in Haskell is sort of a dead end

What makes you say this? It could be better, certainly, but there are people doing it and it’s an area that I’d hope and expect us to really collectively invest in, given the two languages’ similarities and complementary strengths. Lately I’ve been using Mozilla’s cbindgen to create header files from Rust code, and parsing those headers with hs-bindgen, which enables safe generation of much of the boilerplate.

Incidentally, even if you’re only interested in binding to C rather than Rust, I wholeheartedly recommend hs-bindgen. It’s already been mentioned here, and given that you’ve mentioned tiny-wlhs, I assume you’ve seen this thread, and the final post from @dschrempf. Still, I’ve used the older alternatives, and I can’t imagine reaching for anything else these days. I’m now almost done porting one of my libraries to it from c2hs, and it’s made it better in so many ways, from avoiding all sorts of hacks to working nicely with HLS.

As for requiring one or two system libraries like River, I don’t think it’s a huge issue. If they’re widely and sensibly distributed, then all you really need these days is to have pkgconfig-depends in your Cabal file. Then any users building from source can work out where to find the right packages for their OS. And when your project takes off and you start actually packaging it for Nix/Pacman/RPM, you just specify them as dependencies.

Also, regarding Haskell performance, you might want to look at using the non-moving GC to avoid pauses.

Discussion in the ATmosphere

Loading comments...