我正在尝试在 Tock OS 嵌入式操作系统上实现期货。我正在尝试在环境中使用Tokio 。#[no_std]
我的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 库中导入了一些东西。
有可能解决这个问题吗?