我正在尝试在Tock OS嵌入式操作系统上实现futures。我试图在
我的
#[no_std]
环境中使用Tokio。我的
Cargo.toml
文件如下:[package]
name = "nrf52dk"
version = "0.1.0"
authors = ["Tock Project Developers <tock-dev@googlegroups.com>"]
build = "build.rs"
[profile.dev]
panic = "abort"
lto = true
opt-level = "z"
debug = true
[profile.release]
panic = "abort"
lto = true
opt-level = "z"
debug = true
[dependencies]
cortexm4 = { path = "../../arch/cortex-m4" }
capsules = { path = "../../capsules" }
kernel = { path = "../../kernel" }
nrf52 = { path = "../../chips/nrf52" }
nrf5x = { path = "../../chips/nrf5x" }
futures = {version = "0.2.0", default-features = false }
这段代码没有错误,但是当我添加 tokio-reactor = "0.1.1"
后,出现了错误:error[E0463]: can't find crate for std
。我理解这是因为Tokio从std库中导入了一些内容。
有没有办法解决这个问题呢?
impl <T:Notify+'static> From <Arc <T>> for NotifyHandle
),而“no_std”中的“mio”也会变得很复杂。对于自己的需求编写自己的执行器可能更容易一些。 - Stefan