Rust

7950 readers
11 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
2
18
Rust Koans (users.rust-lang.org)
3
 
 

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?

4
5
6
 
 

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.

7
8
9
10
11
 
 

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

12
 
 

«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

13
14
 
 

Also vm repo

15
 
 

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

16
 
 

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!

17
 
 

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

18
19
20
 
 

TCEC is a computer chess engine tournament where chess engines compete in long time controls on strong hardware.
Every game is played from a slightly uneven starting position ("book moves"), to avoid all games ending in a draw.
In order to make this fair, the engines play each starting position twice, once with the white pieces and once with the black pieces.

Reckless won League 1, got second place in the Premier Division, and will now play 100 games in the Superfinal against Stockfish (who has won the last 11 Seasons...).
Time controls are 120'+12".

21
22
 
 

Howdy! I already have some programming experience - i have taken 2 undergraduate-level courses in C - namely Computer Architecture an Operating Systems. My main interest in wanting to learn is that Rust seems to offer huge security benefits as compared to C.

Also if anyone knows a great beginner reference book please lmk! Peace out!

23
 
 

Two-way file sync, no remote agent needed

Today Synchi is finally public! It's designed for syncing files between two locations (local or over SSH). It detects conflicts, and lets you decide what to do.

Why not rsync/Unison/Syncthing?

  • rsync has no memory between runs and is one-way
  • Unison needs to be installed on both sides
  • Syncthing requires always-on daemons

Synchi runs on demand, works over SSH, and only transfers what actually changed.

I use it daily for syncing a shared folder between my machines and an android phone. Works great in combination with Tailscale/WireGuard so that you can sync files remotely.

24
25
view more: next ›