Barebones rust example working in user space.
Requires manually copying the executable over to the image.
This commit is contained in:
parent
844f55c7d0
commit
b0048b0a4f
13 changed files with 707 additions and 1 deletions
18
rust/lib/mammoth/build.rs
Normal file
18
rust/lib/mammoth/build.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
use std::env;
|
||||
|
||||
fn main() {
|
||||
let mut curr_directory = env::current_dir().unwrap();
|
||||
println!("{:?}", curr_directory);
|
||||
assert!(curr_directory.pop());
|
||||
assert!(curr_directory.pop());
|
||||
assert!(curr_directory.pop());
|
||||
|
||||
curr_directory.push("builddbg");
|
||||
curr_directory.push("zion");
|
||||
|
||||
println!(
|
||||
"cargo:rustc-link-search={}",
|
||||
curr_directory.to_str().unwrap()
|
||||
);
|
||||
println!("cargo:rustc-link-lib=zion_stub");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue