Asteroids (Bevy + Rust + WebAssembly)
Just thought I will share some work I have been doing mainly for learning purposes. The game is horribly simplistic as I was focusing more on the mechanics and less on the graphics, my apologies :D
Main things I wanted to get working is
\- latest Bevy + simple game
\- get it running on desktop and/or web
\- load it into a web page
\- wire in controls somehow
It is a prototype and I was less focusing on clean code and more on concepts
the project is here
Happy holidays and have fun :)
https://github.com/erwinacher/asteroids.rs/
https://preview.redd.it/a44hjqaty69g1.png?width=981&format=png&auto=webp&s=fbdd1550fe0eb4ef02702fcc72e80ca2f117342c
https://redd.it/1putdtx
@r_rust
Just thought I will share some work I have been doing mainly for learning purposes. The game is horribly simplistic as I was focusing more on the mechanics and less on the graphics, my apologies :D
Main things I wanted to get working is
\- latest Bevy + simple game
\- get it running on desktop and/or web
\- load it into a web page
\- wire in controls somehow
It is a prototype and I was less focusing on clean code and more on concepts
the project is here
Happy holidays and have fun :)
https://github.com/erwinacher/asteroids.rs/
https://preview.redd.it/a44hjqaty69g1.png?width=981&format=png&auto=webp&s=fbdd1550fe0eb4ef02702fcc72e80ca2f117342c
https://redd.it/1putdtx
@r_rust
GitHub
GitHub - erwinacher/asteroids.rs: Asteroids (Bevy + Rust + WebAssembly)
Asteroids (Bevy + Rust + WebAssembly). Contribute to erwinacher/asteroids.rs development by creating an account on GitHub.
Announcing the ripht-php-sapi crate: Embed PHP in Rust with safe, ergonomic APIs
Hey r/rust! I recently published the initial [ripht-php-sapi](https://crates.io/crates/ripht-php-sapi) RC.
It’s safe Rust bindings for PHP's embed SAPI. Lets you execute PHP noscripts from Rust without touching unsafe code.
use ripht_php_sapi::prelude::*;
let sapi = RiphtSapi::instance();
let noscript = std::path::Path::new("index.php");
let req = WebRequest::get()
.with_query_param("id", "123")
.with_header("User-Agent", "Ripht")
.build(&noscript)
.expect("build failed");
let res = sapi.execute(req).expect("execution failed");
assert_eq!(res.status_code(), 200);
println!("{}", res.body_string());
A little bonus Iv’e added is that you can hook into the SAPI lifecycle to intercept output, errors, logging, etc.
struct StreamHooks;
impl ExecutionHooks for StreamHooks {
fn on_output(&mut self, data: &[u8]) -> OutputAction {
// Do something with the PHP output here...
OutputAction::Handled
}
}
I'd plan to build some higher level Rust-based PHP tooling but need the proverbial clean slate. I also didn’t see any existing SAPI implementations for Rust, so \~3 months later, here it is. A good chunk of that was research. It’s surprising how scarce and archaic the educational material is out there. So, good thing there was 20+ years of battle-tested source code to learn from! Thank you to Nginx unit, php/php-fpm, apache, and Frankenphp. Being able to compare and contrast implementations was extremely helpful. Also gauging interest in content about PHP SAPI internals and Rust FFI if anyone's curious about that rabbit hole: [https://www.patreon.com/posts/gauging-php-sapi-146489023](https://www.patreon.com/posts/gauging-php-sapi-146489023)
GitHub: [https://github.com/jhavenz/ripht-php-sapi](https://github.com/jhavenz/ripht-php-sapi)
Crate: [https://crates.io/crates/ripht-php-sapi](https://crates.io/crates/ripht-php-sapi)
I’m open to feedback
https://redd.it/1putl00
@r_rust
Hey r/rust! I recently published the initial [ripht-php-sapi](https://crates.io/crates/ripht-php-sapi) RC.
It’s safe Rust bindings for PHP's embed SAPI. Lets you execute PHP noscripts from Rust without touching unsafe code.
use ripht_php_sapi::prelude::*;
let sapi = RiphtSapi::instance();
let noscript = std::path::Path::new("index.php");
let req = WebRequest::get()
.with_query_param("id", "123")
.with_header("User-Agent", "Ripht")
.build(&noscript)
.expect("build failed");
let res = sapi.execute(req).expect("execution failed");
assert_eq!(res.status_code(), 200);
println!("{}", res.body_string());
A little bonus Iv’e added is that you can hook into the SAPI lifecycle to intercept output, errors, logging, etc.
struct StreamHooks;
impl ExecutionHooks for StreamHooks {
fn on_output(&mut self, data: &[u8]) -> OutputAction {
// Do something with the PHP output here...
OutputAction::Handled
}
}
I'd plan to build some higher level Rust-based PHP tooling but need the proverbial clean slate. I also didn’t see any existing SAPI implementations for Rust, so \~3 months later, here it is. A good chunk of that was research. It’s surprising how scarce and archaic the educational material is out there. So, good thing there was 20+ years of battle-tested source code to learn from! Thank you to Nginx unit, php/php-fpm, apache, and Frankenphp. Being able to compare and contrast implementations was extremely helpful. Also gauging interest in content about PHP SAPI internals and Rust FFI if anyone's curious about that rabbit hole: [https://www.patreon.com/posts/gauging-php-sapi-146489023](https://www.patreon.com/posts/gauging-php-sapi-146489023)
GitHub: [https://github.com/jhavenz/ripht-php-sapi](https://github.com/jhavenz/ripht-php-sapi)
Crate: [https://crates.io/crates/ripht-php-sapi](https://crates.io/crates/ripht-php-sapi)
I’m open to feedback
https://redd.it/1putl00
@r_rust
crates.io
crates.io: Rust Package Registry
Roadmap for rust
Hey fellow developers, I’m a beginner with a little experience in html, css and Javanoscript and I want to explore and gain knowledge of different languages and environments and rust really intrigued me and I want to learn rust from scratch.
Please any help would really appreciated and kind of resources and advice would greatly help me
Thank you.
https://redd.it/1puwkvy
@r_rust
Hey fellow developers, I’m a beginner with a little experience in html, css and Javanoscript and I want to explore and gain knowledge of different languages and environments and rust really intrigued me and I want to learn rust from scratch.
Please any help would really appreciated and kind of resources and advice would greatly help me
Thank you.
https://redd.it/1puwkvy
@r_rust
Reddit
From the rust community on Reddit
Explore this post and more from the rust community
A configurable keybind config recipe for Tui
Merry Christmas,
A recipe with a migration guide and template is also released. There are more practical ways for you with 0-dependency,
Meanwhile, a new version of
Happy to see your voice on GitHub.
https://redd.it/1pv3vnm
@r_rust
Merry Christmas,
A recipe with a migration guide and template is also released. There are more practical ways for you with 0-dependency,
crossterm-keybind or keybind-rs to build up an application let user easier to change the keybindings.Meanwhile, a new version of
crossterm-keybind is just rolling out. It help you make the keybinding configure well maintained with documentation, and in a backward compatible way. In the release, additional 2 display formats and a `dispatch` method are provided, so one key strike to trigger more than one event is possible. It will be nice and flexible to build a tui or gui application. Happy to see your voice on GitHub.
https://redd.it/1pv3vnm
@r_rust
www.ant-lab.tw
Configurable Keybindings
A space to record things I explore
Rust EAC Error
Hi when I try to connect to an rust server this Error message is coming can anyone help
(eac verify id Token invalid parameters)
https://redd.it/1pv4xfs
@r_rust
Hi when I try to connect to an rust server this Error message is coming can anyone help
(eac verify id Token invalid parameters)
https://redd.it/1pv4xfs
@r_rust
Reddit
From the rust community on Reddit
Explore this post and more from the rust community
Memory Safety Philosophies: Rust vs C++
https://slicker.me/rust/memory_safety_rust_vs_cpp.htm
https://redd.it/1pv5sig
@r_rust
https://slicker.me/rust/memory_safety_rust_vs_cpp.htm
https://redd.it/1pv5sig
@r_rust
slicker.me
Memory Safety: Rust vs C++
Showoff try-rs: Temporary workspace manager with a nice TUI for quick experiments.
# 🦀 try-rs 🦀
(https://github.com/tassiovirginio/try-rs#-try-rs-)
>
(https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667) (https://camo.githubusercontent.com/e52cfdb5a3744a8304637e7aab1009c710f53b5cbdc72a899f3a950df9e4b11f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6275696c745f776974682d527573742d6434353530302e737667)
try-rs is a CLI tool designed to manage the chaos of temporary projects. Instead of cluttering your Desktop or
https://github.com/tassiovirginio/try-rs
https://crates.io/crates/try-rs
https://aur.archlinux.org/packages/try-rs-bin
https://redd.it/1pv5bv2
@r_rust
# 🦀 try-rs 🦀
(https://github.com/tassiovirginio/try-rs#-try-rs-)
>
(https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667) (https://camo.githubusercontent.com/e52cfdb5a3744a8304637e7aab1009c710f53b5cbdc72a899f3a950df9e4b11f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6275696c745f776974682d527573742d6434353530302e737667)
try-rs is a CLI tool designed to manage the chaos of temporary projects. Instead of cluttering your Desktop or
/tmp with test1, new-test, and final-test, try-rs organizes them into date-prefixed directories, offering a robust TUI (Terminal User Interface) to create, navigate, and clean up your experiments.https://github.com/tassiovirginio/try-rs
https://crates.io/crates/try-rs
https://aur.archlinux.org/packages/try-rs-bin
https://redd.it/1pv5bv2
@r_rust
GitHub
GitHub - tassiovirginio/try-rs: A blazing fast, Rust-based workspace manager for your temporary experiments.
A blazing fast, Rust-based workspace manager for your temporary experiments. - tassiovirginio/try-rs
A lightweight Redis terminal management tool built with Rust and Ratatui.
https://preview.redd.it/kqc2s108lb9g1.jpg?width=2748&format=pjpg&auto=webp&s=856c39fc69dee1c0923b207b8234fc530064f25a
https://github.com/osdodo/picordm
https://redd.it/1pv9rcj
@r_rust
https://preview.redd.it/kqc2s108lb9g1.jpg?width=2748&format=pjpg&auto=webp&s=856c39fc69dee1c0923b207b8234fc530064f25a
https://github.com/osdodo/picordm
https://redd.it/1pv9rcj
@r_rust
Beginner Vscode extension with a rust backend
Hey guys, this is my first post in this subreddit. I started learning rust a couple of months ago and I think it's time for my first big project. I'm thinking of building a vscode extension that parses large log files using a rust backend, I'm aware of existing tools like klogg but those are seperate apps, it would be interesting to have vscode do that don't you think ? Anyways the biggest hurdle i have is of course memory handling: dumping the entire thing in memory is just not feasible, at first i thought of using memmap2 crate but after a bit of research i noticed that accessing data that was truncated will lead to panics and accessing lines that were added to the log file after initial mapping will simply not show up and I'll be forced to remap it again and as you know, log files keep rotating and new logs are constantly being added to them. What do you think i should do ? Should i just stick with std::fs::File with Seek ? I need something that allows me to access a specific byte offset in O(1) in both time and space complexities. And by the way, would you use such a tool ?
Rust has been quite the adventure for me and I'm enjoying it so far (although it took me half a day to implement a linked list lol)
Thank you guys for your input and have a good time with your families.
https://redd.it/1pvaoyp
@r_rust
Hey guys, this is my first post in this subreddit. I started learning rust a couple of months ago and I think it's time for my first big project. I'm thinking of building a vscode extension that parses large log files using a rust backend, I'm aware of existing tools like klogg but those are seperate apps, it would be interesting to have vscode do that don't you think ? Anyways the biggest hurdle i have is of course memory handling: dumping the entire thing in memory is just not feasible, at first i thought of using memmap2 crate but after a bit of research i noticed that accessing data that was truncated will lead to panics and accessing lines that were added to the log file after initial mapping will simply not show up and I'll be forced to remap it again and as you know, log files keep rotating and new logs are constantly being added to them. What do you think i should do ? Should i just stick with std::fs::File with Seek ? I need something that allows me to access a specific byte offset in O(1) in both time and space complexities. And by the way, would you use such a tool ?
Rust has been quite the adventure for me and I'm enjoying it so far (although it took me half a day to implement a linked list lol)
Thank you guys for your input and have a good time with your families.
https://redd.it/1pvaoyp
@r_rust
Reddit
From the rust community on Reddit
Explore this post and more from the rust community
Announcing Asterinas 0.17.0
https://asterinas.github.io/2025/12/19/announcing-asterinas-0.17.0.html
https://redd.it/1pvbbld
@r_rust
https://asterinas.github.io/2025/12/19/announcing-asterinas-0.17.0.html
https://redd.it/1pvbbld
@r_rust
privesc - simple multi-platform privilege escalation library
https://github.com/quincy-rs/privesc
https://redd.it/1pvbf7f
@r_rust
https://github.com/quincy-rs/privesc
https://redd.it/1pvbf7f
@r_rust
GitHub
GitHub - quincy-rs/privesc: Small utility library for multi-platform privilege escalation
Small utility library for multi-platform privilege escalation - quincy-rs/privesc
Changed my rust interview prep after bombing a lifetimes question
Had a Rust-heavy backend screen recently where I completely fumbled a pretty basic lifetimes question. The task itself was simple, the painful part was trying to explain why the code compiled while my brain was still stuck in Python and LC habits. I left the call realising most of my prep had almost nothing to do with how I actually write Rust.
Since then I have been changing the routine. I still warm up with a few LC-style problems, but I rewrite the interesting ones in Rust, run them in the playground and let rust-analyzer and clippy complain until the ownership story feels clean. I keep a small note file with “before / after” snippets for lifetimes that confused me so I can revisit them later instead of relearning the same thing from scratch.
For the “talk through your solution” part I rotate between a Discord study buddy, quick whiteboard sketches in Excalidraw and short mock rounds in a couple of interview tools like Pramp, interview solver and Beyz coding assistant to practise saying the ownership and lifetime reasoning out loud under a timer.
If you have been through Rust-heavy interviews, did you get more out of extra LC-style drills or from this kind of Rust-specific explanation practice?
https://redd.it/1pvdeis
@r_rust
Had a Rust-heavy backend screen recently where I completely fumbled a pretty basic lifetimes question. The task itself was simple, the painful part was trying to explain why the code compiled while my brain was still stuck in Python and LC habits. I left the call realising most of my prep had almost nothing to do with how I actually write Rust.
Since then I have been changing the routine. I still warm up with a few LC-style problems, but I rewrite the interesting ones in Rust, run them in the playground and let rust-analyzer and clippy complain until the ownership story feels clean. I keep a small note file with “before / after” snippets for lifetimes that confused me so I can revisit them later instead of relearning the same thing from scratch.
For the “talk through your solution” part I rotate between a Discord study buddy, quick whiteboard sketches in Excalidraw and short mock rounds in a couple of interview tools like Pramp, interview solver and Beyz coding assistant to practise saying the ownership and lifetime reasoning out loud under a timer.
If you have been through Rust-heavy interviews, did you get more out of extra LC-style drills or from this kind of Rust-specific explanation practice?
https://redd.it/1pvdeis
@r_rust
Reddit
From the rust community on Reddit
Explore this post and more from the rust community
I built a tiny 2-qubit quantum simulator in Rust to learn the math
Hey everyone,
I’ve been diving into quantum computing lately and decided to build a lightweight simulator called QNano to help me wrap my head around what’s actually happening under the hood.
It’s limited to 2 qubits for now, but it’s been a great exercise in mapping the quantum gates into code.
https://preview.redd.it/wmwx28gjnd9g1.png?width=1200&format=png&auto=webp&s=58a996bdca99a1bccf738aab8771253e41edc0d8
(https://preview.redd.it/i-built-a-tiny-2-qubit-quantum-simulator-in-rust-to-learn-v0-7znchopend9g1.png?width=1200&format=png&auto=webp&s=933ed8271885bd927b89f748079f7073d4bbbf94)
What it does currently:
Uses a custom `.qnano` assembly-style syntax to write circuits.
Handles complex probability amplitudes (so it tracks phase, not just basic probability).
Supports 7 gates: H, X, Z, S, T, CX, and CZ.
Correctly simulates entanglement (Bell States) and interference.
What’s next: I’m working on a CLI visualizer using Ratatui so I can see the "wires" in the terminal, and I still need to implement a proper
If you're interested in the math or want to see how to handle complex state vectors in Rust, the code is up on GitHub.
https://github.com/Cqsi/qnano
https://redd.it/1pvgyq4
@r_rust
Hey everyone,
I’ve been diving into quantum computing lately and decided to build a lightweight simulator called QNano to help me wrap my head around what’s actually happening under the hood.
It’s limited to 2 qubits for now, but it’s been a great exercise in mapping the quantum gates into code.
https://preview.redd.it/wmwx28gjnd9g1.png?width=1200&format=png&auto=webp&s=58a996bdca99a1bccf738aab8771253e41edc0d8
(https://preview.redd.it/i-built-a-tiny-2-qubit-quantum-simulator-in-rust-to-learn-v0-7znchopend9g1.png?width=1200&format=png&auto=webp&s=933ed8271885bd927b89f748079f7073d4bbbf94)
What it does currently:
Uses a custom `.qnano` assembly-style syntax to write circuits.
Handles complex probability amplitudes (so it tracks phase, not just basic probability).
Supports 7 gates: H, X, Z, S, T, CX, and CZ.
Correctly simulates entanglement (Bell States) and interference.
What’s next: I’m working on a CLI visualizer using Ratatui so I can see the "wires" in the terminal, and I still need to implement a proper
measure function.If you're interested in the math or want to see how to handle complex state vectors in Rust, the code is up on GitHub.
https://github.com/Cqsi/qnano
https://redd.it/1pvgyq4
@r_rust
GitHub
GitHub - Cqsi/qnano: Lightweight quantum gate compiler
Lightweight quantum gate compiler. Contribute to Cqsi/qnano development by creating an account on GitHub.
LeSynth – Fourier 1.2.0 is out.
🎁 Consider this a small Christmas gift update
https://github.com/hlavnjak/lesynth-fourier
https://www.kvraudio.com/product/lesynth---fourier-by-jakub-hlavnicka
https://preview.redd.it/o4yd60fgld9g1.png?width=1713&format=png&auto=webp&s=13197b65fefa8b5a65e97dbf86540867013c3c80
What’s new:
• Windows VST scanning fixed
Resolved an issue where the plugin wasn’t detected by most Windows DAWs due to an unusual plugin file extension. The plugin now scans and loads correctly.
• Resizable GUI fixed
Proper dynamic resizing is now fully supported. Previously, proportional resizing didn’t work correctly for all components and the plugin incorrectly reported resizing as unsupported, so most DAWs disabled it. This is now fixed and reliable.
• Wobble modulation
Added an optional Wobble component for richer, more complex sounds.
Amplitude/time and phase/time curves for each harmonic can now be modulated across buckets/periods using constant and sine curve types, enhanced with additional sine-based Wobble modulation.
• Improved GUI
Cleaner, more refined user interface.
• Extended parameter range
New maximum values (0.025 and 0.05) for finer control and better parameter granularity.
• CLAP support
Added support for the CLAP plugin format.
https://redd.it/1pvgq2j
@r_rust
🎁 Consider this a small Christmas gift update
https://github.com/hlavnjak/lesynth-fourier
https://www.kvraudio.com/product/lesynth---fourier-by-jakub-hlavnicka
https://preview.redd.it/o4yd60fgld9g1.png?width=1713&format=png&auto=webp&s=13197b65fefa8b5a65e97dbf86540867013c3c80
What’s new:
• Windows VST scanning fixed
Resolved an issue where the plugin wasn’t detected by most Windows DAWs due to an unusual plugin file extension. The plugin now scans and loads correctly.
• Resizable GUI fixed
Proper dynamic resizing is now fully supported. Previously, proportional resizing didn’t work correctly for all components and the plugin incorrectly reported resizing as unsupported, so most DAWs disabled it. This is now fixed and reliable.
• Wobble modulation
Added an optional Wobble component for richer, more complex sounds.
Amplitude/time and phase/time curves for each harmonic can now be modulated across buckets/periods using constant and sine curve types, enhanced with additional sine-based Wobble modulation.
• Improved GUI
Cleaner, more refined user interface.
• Extended parameter range
New maximum values (0.025 and 0.05) for finer control and better parameter granularity.
• CLAP support
Added support for the CLAP plugin format.
https://redd.it/1pvgq2j
@r_rust
GitHub
GitHub - hlavnjak/lesynth-fourier: A powerful Fourier synthesizer VST3 audio plugin built in Rust using the nih-plug framework.
A powerful Fourier synthesizer VST3 audio plugin built in Rust using the nih-plug framework. - hlavnjak/lesynth-fourier
Vectarine: A game engine for ultra fast prototyping
I think that Rust is a great language for Game Dev (compared to C++) because of the performance benefits and the large ecosystem.
However, one drawback I've seen is that compilation time and working around the borrow checker can slow you down a lot when you are prototyping or just trying out random gameplay ideas. I feel like this is the case for Bevy (at least, when I tried using it).
I've built this game engine called vectarine to work around these issues by allowing lua noscripting (using the awesome mlua crate).
Link to the repo: https://github.com/vanyle/vectarine/
The interface looks like this (I'm using egui):
https://preview.redd.it/ru8yv7mk1e9g1.png?width=1824&format=png&auto=webp&s=217b9e69bf184decee953aad2e3f35b606ade4cd
I'm open to feedback. I'm planning to integrate 3d as the next step.
https://redd.it/1pvionw
@r_rust
I think that Rust is a great language for Game Dev (compared to C++) because of the performance benefits and the large ecosystem.
However, one drawback I've seen is that compilation time and working around the borrow checker can slow you down a lot when you are prototyping or just trying out random gameplay ideas. I feel like this is the case for Bevy (at least, when I tried using it).
I've built this game engine called vectarine to work around these issues by allowing lua noscripting (using the awesome mlua crate).
Link to the repo: https://github.com/vanyle/vectarine/
The interface looks like this (I'm using egui):
https://preview.redd.it/ru8yv7mk1e9g1.png?width=1824&format=png&auto=webp&s=217b9e69bf184decee953aad2e3f35b606ade4cd
I'm open to feedback. I'm planning to integrate 3d as the next step.
https://redd.it/1pvionw
@r_rust
GitHub
GitHub - vanyle/vectarine: A free cross-platform game engine focusing on fast prototyping and having fun
A free cross-platform game engine focusing on fast prototyping and having fun - vanyle/vectarine
low latency, zero copy networking pipeline in rust for multi producer single consumer like workloads
I have a long running program that ingests a lot of udp packet and then pushes them to listeners, latency is very crucial in here, currently i have an xdp program which filters the relevant packets and have n threads busy polling to rx queues of the nic, after getting the packet i am sending it to another thread which does some processing, dedup and fanout again using xdp. so its like a multiproducer - single consumer pattern.
here while sending the frame to the processing thread i am having to use copy from slice, then freeing the umem memory, in the recv thread loop.
is there any other way i can send to the processing thread and reduce this copy to only when absolutely required, mostly only after the dedup is done, so i dont have to call copy everytime which is expesive?
i was thinking of passing like the umem base ptr, index of releavent packet memory to the consumer thread and the giving it back to the recv thread again once its done processing.. but still it would block on on the recver thread waiting on for these freed packets to come in the channel. so kinda stumped here
https://redd.it/1pvhrvo
@r_rust
I have a long running program that ingests a lot of udp packet and then pushes them to listeners, latency is very crucial in here, currently i have an xdp program which filters the relevant packets and have n threads busy polling to rx queues of the nic, after getting the packet i am sending it to another thread which does some processing, dedup and fanout again using xdp. so its like a multiproducer - single consumer pattern.
here while sending the frame to the processing thread i am having to use copy from slice, then freeing the umem memory, in the recv thread loop.
is there any other way i can send to the processing thread and reduce this copy to only when absolutely required, mostly only after the dedup is done, so i dont have to call copy everytime which is expesive?
i was thinking of passing like the umem base ptr, index of releavent packet memory to the consumer thread and the giving it back to the recv thread again once its done processing.. but still it would block on on the recver thread waiting on for these freed packets to come in the channel. so kinda stumped here
https://redd.it/1pvhrvo
@r_rust
Reddit
From the rust community on Reddit
Explore this post and more from the rust community
How do you handle std/nostd in Cargo workspaces?
I am working on a dual-platform library (Tokio + Embassy). Feature unification kills me - when my std adapter enables `std` on the core crate, it leaks into my nostd Embassy builds even with
My fix: Makefile that builds each crate individually with explicit
Is everyone doing this? Are there any better patterns?
https://redd.it/1pvlqic
@r_rust
I am working on a dual-platform library (Tokio + Embassy). Feature unification kills me - when my std adapter enables `std` on the core crate, it leaks into my nostd Embassy builds even with
default-features = false.My fix: Makefile that builds each crate individually with explicit
--package and --no-default-features. Also build.rs noscripts that panic on invalid feature combos.Is everyone doing this? Are there any better patterns?
https://redd.it/1pvlqic
@r_rust
Reddit
From the rust community on Reddit
Explore this post and more from the rust community
Rust in Production Podcast: 2025 Holiday Special - Year in Review and 2026 Outlook
https://corrode.dev/podcast/s05e07-holiday/
https://redd.it/1pvh3qn
@r_rust
https://corrode.dev/podcast/s05e07-holiday/
https://redd.it/1pvh3qn
@r_rust
Corrode Rust Consulting
2025 Holiday Special - Rust in Production Podcast | corrode Rust Consulting
As we close the chapter on 2025 and celebrate our second year of ‘Rust in Productio…
FRAME - a groove machine built in Rust (compiled to WASM)
https://oyehoy.net
https://redd.it/1pvtkea
@r_rust
https://oyehoy.net
https://redd.it/1pvtkea
@r_rust
Reddit
From the rust community on Reddit: FRAME - a groove machine built in Rust (compiled to WASM)
Posted by wabbitfur - 5 votes and 2 comments
I got tired of writing bad code repeatedly, so I learned Rust to do it only once and made a concurrent processing library - sandl
I'm a game designer and programmer - Sometimes (i.e., every time) I need to do some Monte Carlo simulations for esoteric dice/card systems. Of course, I could copy and paste from older files, but that's an annoying workflow to change up when I come up with new random number generators. To solve this and other problems, I made this:
Repo, Crate. It's called sandl and it's pronounced just like you think it is. The name stands for "Slices and Layers", the key abstraction of the program.
Per the docs, it's a library for building parallel execution engines with dependency management, type-safe method dispatch, and event observation. Layers define behavior via methods, Slices provides args for each method they want to call.
This way, I can configure several thousand RNG workflows, simulate them all concurrently and collect the results neatly and fast-ly.
I'm also currently using it to make a TypeScript code generator so I don't have to write bog-standard CRUDslop routes and DTOs ever again. I also used it to solve the One Billion Rows Challenge a couple of months late.
It's my first real Rust code base and it has some real stinky hacks in it, but I'm overall happy with the result - Being able to make something actually useful (for myself) with a new language has been a nice surprise. I published it because, maybe, it's useful to you, too.
https://redd.it/1pvt6ax
@r_rust
I'm a game designer and programmer - Sometimes (i.e., every time) I need to do some Monte Carlo simulations for esoteric dice/card systems. Of course, I could copy and paste from older files, but that's an annoying workflow to change up when I come up with new random number generators. To solve this and other problems, I made this:
Repo, Crate. It's called sandl and it's pronounced just like you think it is. The name stands for "Slices and Layers", the key abstraction of the program.
Per the docs, it's a library for building parallel execution engines with dependency management, type-safe method dispatch, and event observation. Layers define behavior via methods, Slices provides args for each method they want to call.
This way, I can configure several thousand RNG workflows, simulate them all concurrently and collect the results neatly and fast-ly.
I'm also currently using it to make a TypeScript code generator so I don't have to write bog-standard CRUDslop routes and DTOs ever again. I also used it to solve the One Billion Rows Challenge a couple of months late.
It's my first real Rust code base and it has some real stinky hacks in it, but I'm overall happy with the result - Being able to make something actually useful (for myself) with a new language has been a nice surprise. I published it because, maybe, it's useful to you, too.
https://redd.it/1pvt6ax
@r_rust
GitHub
GitHub - PedroGaya/sandl
Contribute to PedroGaya/sandl development by creating an account on GitHub.