1
我目前正在尝试安装一个嵌入式Rust项目。为此,如果我可以使用collections
板条箱(以及由collections
所要求的扩展板,alloc
板条箱)将会很好。有没有简单的方法来实现这一目标?我目前在Cargo.toml使用收藏与货物没有stdlib
[build-dependencies]
gcc = "0.3"
[dependencies]
rust-libcore = "*"
[dependencies.rlibc]
git = "https://github.com/hackndev/rlibc"
branch = "zinc"
以下的依赖性和如下使用它们:
#![no_std]
#![crate_type="staticlib"]
#![feature(lang_items)]
#![feature(start)]
// This is not found when building with Cargo
extern crate collections;
//#[cfg(target_os = "none")]
extern crate rlibc;
#[start]
pub fn main(_argc: isize, _argv: *const *const u8) -> isize {
// or some call like this
core::collections::Vec::new();
0
}
有没有一种简单的方法包括collections
箱子?
您是否有一些底层分配器可用于嵌入式设备?我不知道jemalloc是否支持ARM,如果不支持,则必须有一些分配器可用。 – Shepmaster