Rust

7970 readers
4 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS
1
 
 

I'm happy to announce the release of diesel-async 0.9. This release changes how diesel-async expects AsyncConnection::transaction calls to be written, moving from using a closure returning a boxed Future to using proper async closures.

Additionally, this release officially moves the GitHub repository from my personal space to the diesel-rs organization. As I'm one of the maintainers of Diesel, this is mostly a symbolic change.

Finally, this release fixes an unsound cast between a #[repr(C)] struct and the underlying memory as a byte slice. This cast could result in accessing the padding bytes in the struct. This vulnerability was discovered by Paolo Barbolini.

Checkout the full announcement post for more details.

I'm happy to answer questions about anything related to the release or Diesel in general.

2
 
 

It was a bit more quiet recently. I hope to add the libcore tests (compiled with rustc_codegen_gcc) in the CI of the Rust repo soon in order to prevent test failures from coming back at every sync: this will greatly help us to focus on feature development.

3
4
5
1
submitted 3 days ago* (last edited 3 days ago) by ISO@lemmy.zip to c/rust@programming.dev
 
 

I checked some of the issues out, and this looks legit. Although a good chuck relates to obscure platform abstractions.

6
 
 

Chapter 2 - Let There Be a World (Procedural Generation) This chapter teaches you procedural world generation using Wave Function Collapse and Bevy.

A layered terrain system where tiles snap together based on simple rules. You'll create landscapes with dirt, grass, water, and decorative props.

By the end, you'll understand how simple constraint rules generate natural-looking game worlds and how tweaking few parameters lead to a lot of variety.

It also gently touches on rust concepts like references, lifetimes, closures, generic and trait bound. (Hoping to go deep in further chapters)

7
8
 
 

A ~200 LOC Rust crate benchmarked against ten other languages — came out ahead of a monomorphized C++ lib by ~4× at sub-fanout dispatch. Hot loop is six instructions. Can you make it faster?

9
1
Rust Koans (users.rust-lang.org)
10
11
 
 

I discuss streams. It's a pretext to learn about higher-order streams, like flatten and to introduce a new stream: switch! It's very useful, and will have no secret for you.

12
13
14
15
16
17
 
 

Cross posted from https://framapiaf.org/users/lexoyo/statuses/116334564580892728

Sidenai/sidex: VS Code rebuilt on Tauri. Same architecture, 96% smaller. Early release.
https://github.com/Sidenai/sidex

#foss #OpenSource #Rust @tauri

18
 
 

«Ubuntu setzt auf ntpd-rs — Rust für präzise Zeitsynchronisierung:
Ubuntu plant, ntpd-rs als Standard für die Zeitsynchronisierung einzuführen. Die Rust-Implementierung soll chrony und weitere Tools ersetzen.»

Ich bin kein @ubuntu Fanboy aber ich mag @rust und deswegen sehe ich deren Einsatz sehr positiv.

🕑 https://www.heise.de/news/Ubuntu-setzt-auf-ntpd-rs-Rust-fuer-praezise-Zeitsynchronisierung-11240439.html

#zeit #rust #ubuntu #linux #ntp #linuxptp #ntpd_rs #ntpd #rustlang #sudo #sudors #nts #ptp #rustcode #rustlang #standart #GPDP #gps #rustls #coding #code #time

19
20
 
 

Also vm repo

21
 
 

Dmitry has released the first stable version of his engine after 7 years of active development!

22
 
 

cross-posted from: https://vger.social/post/37291894

godot-rust goes into the next round with v0.5, just released on crates.io!

On the toolchain side:

  • We now support Rust edition 2024 and Godot 4.6 out of the box, as well as all versions >= 4.2.

  • WebAssembly support no longer needs LLVM/bindgen and is being unit-tested on CI.

  • It's now possible to depend on other godot-rust crates through rlib.

Some features added in this cycle:

Typed dictionary. Also, enums in Godot collections!

let tiles: Dictionary<Vector2i, Tile> = dict! {
   Vector2i::new(1, 2) => Tile::GRASS,
   Vector2i::new(1, 3) => Tile::WATER,
};

Non-null engine APIs:

// Instead of...
let t: Gd<Tween> = node.create_tween().unwrap();
// ...now:
let t: Gd<Tween> = node.create_tween();

Direct == &str comparison, saving allocation:

let s = StringName::from("hello");
if s == "hello" { ... }

Bitfield Debug impl:

assert_eq!(
    format!("{flags:?}"),
    "PropertyUsageFlags { EDITOR | READ_ONLY }"
);

Optional parameters -- call from GDScript as method(1) or method(1, 2):

#[func]
fn method(
    required: i32,
    #[opt(default = 100)] optional: i32,
) { ... }

Export tool button -- click in Godot's inspector to immediately execute Rust code:

#[export_tool_button(fn = Self::on_clicked, icon = "2DNodes")]
click_me: PhantomVar<Callable>, // not a physical property

We now also have a Games page showcasing projects that users made with godot-rust! And I'm still behind on adding new entries there :)

Huge thanks to the community for making this possible! Countless bug reports, PRs, and feedback based on real-world projects have helped godot-rust immensely to reach this point.

If you like the project, consider giving us a star on GitHub. As it's maintained entirely in free time without any financial backing, small GitHub Sponsor contributions are also very appreciated (Yarwin or TitanNano or Bromeon). Thanks to everyone supporting the project -- We are excited to see what will be built on v0.5!

23
 
 

I am not the author but I've been looking for a tool like this for a long time! This looks really nice! :D

24
25
view more: next ›