코딩Coding/★Rust★기초★Syntax
-
How to draw a pixel to the screen ?코딩Coding/★Rust★기초★Syntax 2023. 9. 16. 09:23
https://www.reddit.com/r/rust/comments/5j07bx/how_to_draw_a_pixel_to_the_screen/ From the rust community on Reddit Explore this post and more from the rust community www.reddit.com https://users.rust-lang.org/t/gui-or-2d-game-crate-writing-some-drawing-app/79169 GUI or 2d game crate writing some drawing app? I'm thinking of writing a very simple drawing/animation app for my 5-year-old daughter. ..
-
What's the difference between Arc<Mutex<_>> and std::sync::atomic::Atomic_?코딩Coding/★Rust★기초★Syntax 2023. 9. 10. 14:22
What's the difference between Arc and std::sync::atomic::Atomic_? https://stackoverflow.com/questions/75456126/whats-the-difference-between-arcmutex-and-stdsyncatomicatomic What's the difference between Arc and std::sync::atomic::Atomic_?I have no experience using Atomic_, below is how I used to share states. use std::sync::{Arc, Mutex}; #[tokio::main] async fn main() { let shared_value = Arc::n..
-
How to create a cyclic reference with Arc and Weak?코딩Coding/★Rust★기초★Syntax 2023. 9. 10. 13:47
https://stackoverflow.com/questions/50425910/how-to-create-a-cyclic-reference-with-arc-and-weak How to create a cyclic reference with Arc and Weak? I have two structs: struct A { map: HashMap, } struct B { weak: Weak } When A is constructed, it will own several B, each of which links back to the A ... stackoverflow.com
-
Rust❤How would I store hexedecimal values in a variable?코딩Coding/★Rust★기초★Syntax 2023. 9. 6. 14:06
https://users.rust-lang.org/t/how-would-i-store-hexedecimal-values-in-a-variable/45545/6 How would I store hexedecimal values in a variable? Just to make it explicit in case you don't know. If your value is not provided as string you can write hex-literals directly in your source code, e.g. let dec: u32 = 15; let hex: u32 = 0xF; let bin: u32 = 0b1111; let oct: u32 = 0o17; assert_eq!(dec, hex); u..
-
파이썬 개발자의 위한 러스트 배우기 좋은 eBook(Rust Tutorial)코딩Coding/★Rust★기초★Syntax 2023. 8. 17. 09:49
https://rochacbruno.github.io/py2rs/ py2rs let x = Rust::from("Python"); A quick reference guide for the Pythonista in process of becoming a Rustacean. The sketch Mrs. Jalin: George. Mr. Jalin: Yes, Gladys. Mrs. Jalin: There's a man at the door with a moustache. Mr. Jalin: Tell him I've already got rochacbruno.github.io