My above repo contains example with the Rust standard library that build as fat executables with Cosmopolitan Libc.
I also got ripgrep to build https://github.com/ahgamut/ripgrep/tree/cosmopolitan, but it wasn't part of the cosmocc binaries because some crates that are part of the build require `#!feature(rustc_private)]` to be added to their source code. Same goes for bat and fd.
To summarize, Rust CLI tools can be built with Cosmopolitan Libc, but to build them like we can build gcc/emacs/git right now, we will need some support and Rust expertise.
Last time I looked into Rust-on-Cosmopolitan, I couldn't make it work as Cosmopolitan determined syscall numbers, signal numbers, and such at runtime, but Rust standard library assumes compile-time constants (basically the same issue that C switch-case has). How did you get around that? Have you tested these binaries on non-Linux platforms?
We have about ~700 test executables and two programs called runit/runitd which remote execute them across our entire test fleet each time we run `make test`. Currently, the fleet consists of `freebsd rhel7 xnu win10 openbsd netbsd pi silicon`. We used to have rhel5 and win7 in there too, but I've been slacking off the past few months. You can watch a video of how running all the test executables on all the systems only takes about fifteen seconds. https://justine.lol/sizetricks/#why
The trick could definitely work with rust since fundamentally it's "just" a hack on how the various scripts work on different systems. Actually getting the rust compiler to produce cosmopolitan binaries would likely be a heavy lift though.
Also it says it supports WASM (wasi?) so some applications might work out of the box with that.