So I'm following this tutorial on how to create a VERY BASIC Operating System using the Rust programming language. (I intend on buying an actual book on the subject, but I'm using this for now).
Here are some files we created just to clarify things a little:
Cargo.toml
[package] name = "blog_os" version = "0.1.0" authors = ["Philipp Oppermann <[email protected]>"] # Here I used my own details [lib] crate-type = ["staticlib"]src/lib.rs
#![feature(lang_items)] #![no_std] #[no_mangle] pub extern fn rust_main() {} #[lang = "eh_personality"] extern fn eh_personality() {} #[lang = "panic_fmt"] #[no_mangle] pub extern fn panic_fmt() -> ! {loop{}}x86_64-blog_os.json
{ "llvm-target": "x86_64-unknown-none", "data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128", "linker-flavor": "gcc", "target-endian": "little", "target-pointer-width": "64", "target-c-int-width": "32", "arch": "x86_64", "os": "none", "disable-redzone": true, "features": "-mmx,-sse,+soft-float" }
If you scroll down to the Compiling section in the tutorial, the author shows us how to install xargo and how to use it to build.
We're then asked to run:
> xargo build --target=x86_64-blog_os
But when I do, I get the following error message:
error: failed to parse manifest at '/home/max/TesterOS/src/Cargo.toml'
Caused by:
can't find library 'blog_os', rename file to 'src/lib.rs' or specify lib.path
Is the issue connected to where I saved my files? Because I followed the tutorial down to the letter, but the author wasn't specific in where everything should be saved.