本篇主要内容

本篇的主要内容为,在开发过程中遇到的一些代码上的问题,包括Rust的语言特性,以及对Embassy和uCOSII更深层次的一点理解和一些变动

1. rust cargo error

1.1 cargo shows error

rust analyzer runs at the same time you run a cargo command after updating the toolchain file. If it's not that please open a new rustup issue

https://github.com/rust-lang/rust-clippy/issues/12763

The workaround is to uninstall the toolchain and reinstall it, usually stopping rust analyzer or similar while you're doing that

1.2 cargo stuck in  waiting for cargo metadata or cargo check

https://github.com/rust-lang/rust-analyzer/issues/10910

1.3 A Chinese problem, we may need mirror accelerate

https://juejin.cn/post/7133482060307496997

and we set a proxy for git

https://blog.csdn.net/yoyo_u/article/details/132637141

2. defmt

as the code show below, the defmt and log feature can not be active at the same time.

#[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features.");

3. Why Embassy-Executor’s test can run with src in no_std?

https://stackoverflow.com/questions/28185854/how-do-i-test-crates-with-no-std

4. rust conditional compilation