What's everyone working on this week (35/2025)?

New week, new Rust! What are you folks up to?

1 Like

A web radio source, intended to be used for broadcasting computer-music live conserts.
Includes ogg encoding, icecast streaming and a cute little toml-config handling

3 Likes

I just released new versions of my libraries exhaust and nosy. I like to do what I can to keep software update “churn” low, so I’m happy to be able to say that neither of these releases, several months after the previous, were due to dependencies needing updates — just new features, fixes, and polish.

  • exhaust provides a trait and derive macro which allow iterating over all possible values of a given type, including the values of their fields (not just fieldless enums). This allows you to define types which precisely represent “all possible cases” and then process those cases.

    In version 0.2.4, the derive macro now supports types with const generic parameters, and generates simpler code to improve build performance (inspired by nnethercote’s work (also)).

    • The most embarrassing-in-retrospect part is that I had what turned out to be the if option.is_some() { option.unwrap() } anti-pattern, just disguised by involving code generation and many Options rather than one. I replaced that with a match.
    • Did I say that was the most embarrassing part? No, actually, I forgot to publish the actual macro package and didn’t notice until I was writing this post. I think it’s an unfortunate default behavior of Cargo that if you make a [workspace] that's also a package, the default behavior of commands is to operate on the root package only, but you can override it with workspace.default-members, and so I won’t make this mistake again (because cargo publish will error if I do).
  • nosy is a library for broadcasting messages/events; in particular, for delivering precise change notifications (e.g. “these particular elements of this collection have changed”) without unbounded buffering or blocking. To achieve this, it provides a very opinionated form of listeners/callbacks that are expected to coalesce redundant messages.

    In version 0.2.0, I found that a trait was mis-designed so that it could not be implemented outside the crate in the way I intended. So, I had to make a breaking change. Always test your library API designs with doctests or test targets!

7 Likes

Been looking at SAT solvers - for solving Boolean satisfiability problems.
Kissat (C) seems to be one of the strongest at the moment.

Rust has a couple of SAT solvers - I like Varisat.

The source has not been touched in 5 years - but it is a nice implementation. Used it to set up a couple of toy puzzle solvers - n-queens, sudoku, map colouring.

1 Like

I've been playing around with building a cmake (backend) generator which outputs a cargo project using build.rs and the cc crate. I've got enough of it working to build neovim with cargo. I'm not very familiar with c++ so most of the code was generated by an llm, but I had to do a lot of work to get it working properly.

My thinking is you could hook this up in such a way so it's easier to progressively migrate cmake projects to rust.

Discovering that CRUD apps in Rust are hard. Usually I use Rust for graphics and Go for web stuff, but I decided to try Rust for a web server needed for some of the graphics stuff.

  • None of the FCGI libraries work with Apache web server's mod_fcgid. So I wrote one.
  • The crate mysql does not interoperate with Dreamhost shared servers because they can't agree on an authentication scheme. Rust's crate doesn't support the deprecated scheme Dreamhost wants to use. Beating on Dreamhost.

pathx, a collection of utilites for working with paths

I am improving my CLI tool, offline-scrobbler, which scrobbles music to Last.fm without requiring online playback and supports a flexible album search. Feel free to try!

This week's improvement focuses on hardening the credential files. It turns out the approach is not cross-platform, so one should use cfg!(unix) to guard Unix-specific code that sets the owner. I am also exploring the use of keyring crate, though the build configuration is somewhat cumbersome. Since I'm trying to provide an easy way for end-users to build this package via cargo install and prebuilt binaries from GitHub Actions, platform integration remains a challenge. Also, recently GitHub CI and Rust demoted Intel Macs to a second-tier target, making building Intel binaries much more difficult.

My previous challenges with fluent datetime handling and library choice for the best date crate are described in the blog post.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.