Rust: Pro
Opened this issue · 6 comments
hhstore commented
Rust 进阶部分:
Rust 硬核劝退篇:
- https://coolshell.cn/articles/20845.html
- ⭐⭐⭐⭐
- 皓哥 带你踩坑 rust.
- 踩坑: rust 设计有缺陷 & 不一致的地方.
Rust 标准库:
Rust 宏:
Rust 算法:
用 Rust 写 OS:
hhstore commented
Rust FAQ:
Rust Context?
- https://www.reddit.com/r/rust/comments/j4xx7i/what_is_the_rust_story_for_a_package_like_gos/
- rust中有没有类似golang中的context的功能?
- https://medium.com/@polyglot_factotum/rust-concurrency-patterns-no-context-no-cancel-no-leak-b6c1ec2dafa5
- webrtc-rs/webrtc#57
tokio 等价概念:
use tokio::time::timeout;
use tokio::sync::oneshot;
use std::time::Duration;
let (tx, rx) = oneshot::channel();
// Wrap the future with a `Timeout` set to expire in 10 milliseconds.
if let Err(_) = timeout(Duration::from_millis(10), rx).await {
println!("did not receive value within 10 ms");
}
搜索:
tokio-context
Rust App Global Context:
- 类似全局变量概念
- https://stackoverflow.com/questions/19605132/is-it-possible-to-use-global-variables-in-rust
- https://users.rust-lang.org/t/a-guide-to-global-data-in-rust/42574
- https://stackoverflow.com/questions/70293644/how-to-use-shared-variables-rusts-rocket-web-framework
- https://haibane-tenshi.github.io/rust-contexts/
- https://github.com/matklad/once_cell
- https://github.com/vorner/arc-swap
rocket:
hhstore commented
Rust 过程宏:
陈天视频讲解:
视频:
- ✅【Rust 过程宏(第一弹)】 https://www.bilibili.com/video/BV1Za411q7LQ
依赖库:
- ✅ https://github.com/djc/askama
- jinja2 模板
hhstore commented
1
hhstore commented
1
hhstore commented
1