Rookie Question: &T vs Box
As someone who is not professionally a programmer or officially educated as such, I am about two to three months into learning Rust, and most concepts I have been able to slowly reason my way through....
View ArticleHolyRust: a Rust-flavored JIT dialect where ownership errors print a...
Hi all, I want to share a language experiment, and the one question it keeps raising: what if ownership were a runtime diagnostic instead of a compile-time gate? The context in one sentence: HolyRust...
View ArticlePass small structs by value or reference?
I have a struct: struct DocPos { block: Uuid, offset: usize, flags: u32 } And lots of functions around it, for example: fn doc_pos_to_utf16_index(pos: DocPos) -> Utf16Index fn...
View ArticleMulti_bimap - many-to-many bimap freely made of two arbitrary maps
The popular Rust crate for bidirectional maps, bimap, is limited to one-to-one relations (bijections) only (and appears unmaintained). But sometimes you need to have one-to-many and many-to-many...
View ArticleRust Bootcamp Project RouteForge Review
Hi everyone, I’m looking for some feedback on my capstone project for a Rust bootcamp. The project is RouteForge, a backend system that turns a day's parcel orders into optimized courier routes and...
View ArticleAnnouncing virtual-file-transfer 0.1.0: Windows virtual-file drag-and-drop...
Hi everyone, I recently released virtual-file-transfer v0.1.0, a Rust crate for transferring virtual files through Windows drag-and-drop and the clipboard. It allows applications to expose data from...
View ArticleBuffer initialization does not get optimized out
I have the following snippet (minimization of a similar problem encountered in real code): const N: usize = 32; fn read(block: &[u8; 8 * N]) -> [u64; N] { let (chunks, tail) =...
View ArticleVS Code, test panic, can't click and go to stack trace locations
I thought this used to work. I run a unit test in VS Code, and it panics. In the terminal I see stuff like: 1: core::panicking::panic_fmt at /rustc/[...]\core\src\panicking.rs:80 2:...
View ArticleKoof: Kubernetes OpenAPI Operator Framework
Hi everyone! For my bootcamp project I built koof, a framework that generates Kubernetes operators from OpenAPI specs. You describe resources with a few x-kube-* extensions in OpenAPI Overlays, and it...
View ArticleSmartHomeLab for Home Assistant
Hi everyone! I’m on the home stretch of a Rust bootcamp, and my capstone project is Smart Home Lab. I’d love a review from people who write Rust daily. Virtual smart-home devices with a web UI,...
View ArticleWhy Does an Out-of-Bounds Array Index Fail at Compile Time in One Case but at...
I'm learning Rust and trying to understand the difference between compile-time errors and runtime panics when accessing array elements. Consider the following code: fn main() { let a: [u32; 5] = [1,...
View ArticleExchange: a deterministic order book and matching engine in Rust
Hi! I'd like feedback on exchange, a limit order book and matching engine in Rust: orders go in, trades and an event stream come out. Repo: GitHub - Wandalen/exchange · GitHub The problem A matching...
View ArticleRing: a lock-free "many writers, one ordered reader" queue in Rust
Hi! I'd like feedback on ring, a family of Rust crates for a lock-free write path: many threads send work, and one thread processes it in a strict, reproducible order. Repo: GitHub - Wandalen/ring:...
View ArticleExact — finance math that can't lose a cent
Hi! I'd like feedback on exact, a small set of Rust crates for financial math. Repo: GitHub - Wandalen/exact · GitHub The problem 0.1 + 0.2 isn't 0.3 with floats, and in a market those errors add up....
View ArticleQt+WGPU integration
I occasionally need/want to write a small 3D program with a bit of UI (e.g. qt-tracing, hyperboloid). So this is what I came up with: NotEuclid’s Gitea qt-wgpu-skel Qt + WGPU skeleton Basically, it...
View ArticleClippy wants a Safety section for functions marked with target_feature
When I run clippy on this: #[target_feature(enable = "avx")] pub fn f() {} I get a warning: warning: unsafe function's docs are missing a `# Safety` section --> src/lib.rs:2:1 | 2 | pub fn f() {} |...
View ArticleLoole 0.6.0: Improved correctness, performance and Flume compatibility
Hi everyone! I've recently released a new version of Loole, a Rust channel crate that supports multiple producers and multiple consumers, with both synchronous and asynchronous send/receive...
View ArticleMusic Recommendation System written on Rust
I made this as my bootcamp project, and I would really appreciate it if anyone took a look at it and left a review, by leaving some comments in the PR in the link below or under this post regarding...
View ArticleUse cases for Try
As we move towards stabilising trait Try I'm trying to collate real-world, actually-implemented, examples. Anyone who knows of such cases, or has a concrete use case they would like to see, please...
View ArticleHow to test a wasm app fully?
This might not fully be rust specific, but using cargo to test is so convenient that I kinda want to use it... So, I have this desktop app which is well tested, which I'm converting to a wasm app....
View Article