The rules behing Rust functions(blog.cuongle.dev)
blog.cuongle.dev
The rules behing Rust functions
https://blog.cuongle.dev/p/the-hidden-rules-behind-rust-functions
18 comments
To the author of this blog post: please write the code examples as syntax-colored text,
and definitely not as images.
I'd love to copy the code and paste it into the Rust playground or godbolt,
so I can see exactly what the compiler does and how the code behaves.
I can't do that with screenshots of code.
Hi, author here.
I didn't know my post was submitted here. So sorry for the late answer.
The problem with code on substack is that they don't have syntax highlight which make reading the code a pain :( Let me see how to improve it in the next posts.
Thank you for reading!
I didn't know my post was submitted here. So sorry for the late answer.
The problem with code on substack is that they don't have syntax highlight which make reading the code a pain :( Let me see how to improve it in the next posts.
Thank you for reading!
You can on Apple’s OSs, and some googling suggests you can do it on windows too if you save the image and open in the image viewer. Therefore I’d be surprised if you couldn’t get it working on various linux distros too...
Would be interesting to see a comparison with GCC's C closures[1].
[1] https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html
[1] https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html
[deleted]
You'd never have written "behing" if your keyboard's firmware, all the drivers, OS and the GUI and input control were written in Rust!
meindnoch(4)