New week, new Rust! What are you folks up to?
I learned a bit about huge and large pages. Which I never knew existed until very recently.
I’m dusting off my incomplete naga-rust project, which allows you to translate GPU shader code to Rust and execute it on CPUs, without installing any tools beyond the rustc you already have. This is intended for unit testing shader code, and for writing mathematical code that can be shared between the GPU and CPU parts of your application. I left it in a “proof of concept” state last year, and I am now working on finishing enough features that it’s actually useful.
Also, Rust 1.95 will be released this week, so I’m writing changes to use the new features. Most of what’s of interest to me is just slightly better syntax for things, like cfg_select! (a built-in replacement for the cfg-if macro library). cold_path() lets you express that some control flow is unlikely to be taken, where previously you had to split it out into a #[cold] function. We're also seeing the first stabilization of core::range, which will eventually bring us range types that implement Copy instead of not.
I'm writing a Copy-on-Write relational database for no particular reason. I have the physical page logic written (heap page, btree page, superblock page...) and I've rewritten the page-cache/page-buffer a few times now.
Trying out loom and shuttle to find concurrency bugs, which have both been fun. Experimenting with the typestate pattern more than I had already for the "frame" transitions too (loaded in, dirty, uninitialized, etc.) loaded with asserts to crash the loom/shuttle tests.. Basically just using it to try out a bunch of patterns I haven't gotten around to much yet.
I was just experimenting with this too in addition to hugetlb. I'm going to come back to it later, though, as I didn't want to do the reconfiguration on my home Git/CI to support them (or write a bunch of extra fallback code at them moment). Are you using them for anything in particular?
No, but I am wondering about it for memory allocators I have made. I think at some point I found a crate. Also a 5 part series here:
My memory is so bad it makes things difficult.