New week, new Rust! What are you folks up to?
Slowly figuring out how to make one of my weird little libraries be more no_std compatible — making its types able to be Send + Sync all the time instead of only with std — by making it more generic instead of hard-coded uses of std::sync::{Mutex, RwLock}. It’s been slow going, improving one piece at a time and discovering patterns that apply to more cases.
The “easy” way would be to incorporate lock_api and make my types generic over the lock_api::RawMutex they use. There are two problems with doing it that way instead:
lock_api::RawMutexis not and cannot be implemented forstd::sync::Mutex.- Having that extra parameter everywhere is ugly. If I’m going to make things more generic, it'd be nice for that generic to create meaningful flexibility at the application level, not just “plug something in here to make it possible for this to work”. (For example, being generic over “this is an interior-mutable value container” allows the use of atomics or
core::cell::Cellinstead of mutexes, which can be far more efficient when possible.)
(And yes, arguably this whole project is a self-inflicted over-abstraction problem.)
I am new to rust, so after rust-book going through Zero to Production in Rust by Luca Palmieri
I'm slowly working on improving my custom quiz app, quizgen. What started as a CLI side project to expand my English vocabulary has turned into a versatile quiz app that can potentially tackle just about anything quizzable—mental math, synonyms, definitions, etc.
It's really taken off, and now I’m using it as a chance to dive into web-dev with Rust.
Improving my stacktrace viewer:
- have a play -- it's all client side logic: stacktrace • azriel.im
- repo: GitHub - azriel91/stacktrace: helps you see the relevant parts of a stack trace
