Quantcast
Channel: The Rust Programming Language Forum - Latest topics
Browsing index pages (53920 articles)
↧

Buffer 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 Article


Image may be NSFW.
Clik here to view.

VS 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 Article


Image may be NSFW.
Clik here to view.

Koof: 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 Article

SmartHomeLab 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 Article

Why 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 Article


Exchange: 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 Article

Ring: 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 Article

Exact — 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 Article


Image may be NSFW.
Clik here to view.

Qt+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 Article


Clippy 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 Article

Loole 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 Article

Image may be NSFW.
Clik here to view.

Music 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 Article

Image may be NSFW.
Clik here to view.

Use 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 Article


How 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

Image may be NSFW.
Clik here to view.

Wurble: I don't always warble but when I do I always burble

github.com GitHub - 06chaynes/wurble Contribute to 06chaynes/wurble development by creating an account on GitHub. https://crates.io/crates/wurble You ever want your text to sound like someone trying...

View Article


Image may be NSFW.
Clik here to view.

Rust a good language for web applications

I used Java for web applications for decades, however recently I switched to Rust and found that Rust is even more suitable for the purpose. My up time is also imp;roved making the web server running...

View Article

Image may be NSFW.
Clik here to view.

How do I link to my macro whose name clashes with a struct and which is...

I just released bevy_exclusive_components, exclusive.rs contains a macro and a struct, both have the same name: struct Exclusive { // -- SNIP -- } macro_rules! Exclusive { // -- SNIP -- } lib.rs...

View Article


Non dyn usable assoc type

hi folks! why does an assoc type with a Self: Sized bound non dyn usable? (I just crammed this fact and I don't know why exactly does it work this way....) trait Trait { type Foo where Self: Sized; fn...

View Article

Image may be NSFW.
Clik here to view.

I wrote a small library for exclusive component filtering in bevy

(Written entirely by me, a human, 100% free of slop) Codeberg.org bevy_exclusive_components bevy_exclusive_components (Description copied from the README) A library for running systems that access...

View Article

Kolibrie v0.2.0: a neuro-symbolic stream reasoning engine in Rust

Hi everyone, I’d like to share Kolibrie, an open-source neuro-symbolic stream reasoning engine written in Rust. We’ve just released v0.2.0. "Neuro-symbolic" means combining neural learning and model...

View Article
Browsing index pages (53920 articles)


Latest Images