zshift

joined 2 years ago
[–] [email protected] 2 points 8 months ago* (last edited 8 months ago) (4 children)

@Jenztsch @FizzyOrange

Eg

fn foo() -\> Vec\<i32\> {  
 let mut out = Vec::new();  
 macro! bar(i: i32) {  
 out.push(i);  
 }

 for i in 1..10 {  
 bar!(i);  
 }

 out  
}  
[–] [email protected] 2 points 8 months ago (6 children)

@Jenztsch @FizzyOrange it would be nice if rust had a feature like inline macros for this kind of behavior just for reducing duplications when you don’t need to capture values as part of a closure.

[–] [email protected] 6 points 1 year ago* (last edited 1 year ago) (2 children)

@varsock @Timely_Jellyfish_2077 out of curiosity, why use grpc in lieu of ffi?

[–] [email protected] 2 points 1 year ago (1 children)

@darkregn Checkout @jonhoo’s channel. He has many videos doing deep dives into how rust works, and several case studies of existing crates and how they work. They are excellent resources for learning rust.

https://youtube.com/@jonhoo