【发布时间】:2017-03-29 15:20:08
【问题描述】:
Cargo.toml:
[package]
name = "proba"
version = "0.1.0"
[lib]
name = "mycoollib"
path = "src/mycoollib.rs"
crate-type = ["cdylib"]
src/mycoollib.rs:
#![no_std]
fn func(v: i32) -> i32 {
v + 10
}
当我尝试运行cargo build:
error: language item required, but not found: `panic_fmt`
error: language item required, but not found: `eh_personality`
需要每晚构建才能实现 panic_fmt 和 eh_personality,但 Rust 书中的 "Using Rust Without the Standard Library" 说库可以构建在 stable 之上。
【问题讨论】:
标签: rust