From 888f0018d783d440e5e0c014b940c2ac8ffbc391 Mon Sep 17 00:00:00 2001 From: WangRunji Date: Thu, 21 Feb 2019 14:37:42 +0800 Subject: [PATCH] move rcore-ulib to rcore-user --- user/Cargo.lock | 9 +-------- user/Cargo.toml | 4 ++-- user/rcore-ulib/Cargo.toml | 8 -------- user/src/bin/fantastic_text.rs | 2 +- user/src/bin/hello_rust.rs | 4 ++-- user/src/bin/sh.rs | 6 +++--- user/{rcore-ulib => }/src/io.rs | 0 user/{rcore-ulib => }/src/lang_items.rs | 0 user/{rcore-ulib => }/src/lib.rs | 0 user/{rcore-ulib => }/src/syscall.rs | 0 10 files changed, 9 insertions(+), 24 deletions(-) delete mode 100644 user/rcore-ulib/Cargo.toml rename user/{rcore-ulib => }/src/io.rs (100%) rename user/{rcore-ulib => }/src/lang_items.rs (100%) rename user/{rcore-ulib => }/src/lib.rs (100%) rename user/{rcore-ulib => }/src/syscall.rs (100%) diff --git a/user/Cargo.lock b/user/Cargo.lock index c45f91e..7e2e08e 100644 --- a/user/Cargo.lock +++ b/user/Cargo.lock @@ -9,19 +9,12 @@ dependencies = [ ] [[package]] -name = "rcore-ulib" +name = "rcore-user" version = "0.1.0" dependencies = [ "linked_list_allocator 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rcore-user-programs" -version = "0.1.0" -dependencies = [ - "rcore-ulib 0.1.0", -] - [[package]] name = "spin" version = "0.4.10" diff --git a/user/Cargo.toml b/user/Cargo.toml index cdd8ee9..6122d8e 100644 --- a/user/Cargo.toml +++ b/user/Cargo.toml @@ -1,8 +1,8 @@ [package] -name = "rcore-user-programs" +name = "rcore-user" version = "0.1.0" authors = ["Runji Wang "] edition = "2018" [dependencies] -"rcore-ulib" = { path = "rcore-ulib" } \ No newline at end of file +linked_list_allocator = "0.6" \ No newline at end of file diff --git a/user/rcore-ulib/Cargo.toml b/user/rcore-ulib/Cargo.toml deleted file mode 100644 index 96590a8..0000000 --- a/user/rcore-ulib/Cargo.toml +++ /dev/null @@ -1,8 +0,0 @@ -[package] -name = "rcore-ulib" -version = "0.1.0" -authors = ["WangRunji "] -edition = "2018" - -[dependencies] -linked_list_allocator = "0.6" diff --git a/user/src/bin/fantastic_text.rs b/user/src/bin/fantastic_text.rs index f78642d..b1403ed 100644 --- a/user/src/bin/fantastic_text.rs +++ b/user/src/bin/fantastic_text.rs @@ -2,7 +2,7 @@ #![no_main] #[macro_use] -extern crate rcore_ulib; +extern crate rcore_user; macro_rules! color_text { ($text:expr, $color:expr) => {{ diff --git a/user/src/bin/hello_rust.rs b/user/src/bin/hello_rust.rs index e60b97e..56f7d23 100644 --- a/user/src/bin/hello_rust.rs +++ b/user/src/bin/hello_rust.rs @@ -2,12 +2,12 @@ #![no_main] #[macro_use] -extern crate rcore_ulib; +extern crate rcore_user; // IMPORTANT: Must define main() like this #[no_mangle] pub fn main() { println!("Hello Rust uCore!"); - println!("I am process {}.", rcore_ulib::syscall::sys_getpid()); + println!("I am process {}.", rcore_user::syscall::sys_getpid()); println!("hello pass."); } diff --git a/user/src/bin/sh.rs b/user/src/bin/sh.rs index b467790..43ba90e 100644 --- a/user/src/bin/sh.rs +++ b/user/src/bin/sh.rs @@ -4,12 +4,12 @@ extern crate alloc; #[macro_use] -extern crate rcore_ulib; +extern crate rcore_user; use alloc::vec::Vec; -use rcore_ulib::io::get_line; -use rcore_ulib::syscall::{sys_exec, sys_fork, sys_wait}; +use rcore_user::io::get_line; +use rcore_user::syscall::{sys_exec, sys_fork, sys_wait}; // IMPORTANT: Must define main() like this #[no_mangle] diff --git a/user/rcore-ulib/src/io.rs b/user/src/io.rs similarity index 100% rename from user/rcore-ulib/src/io.rs rename to user/src/io.rs diff --git a/user/rcore-ulib/src/lang_items.rs b/user/src/lang_items.rs similarity index 100% rename from user/rcore-ulib/src/lang_items.rs rename to user/src/lang_items.rs diff --git a/user/rcore-ulib/src/lib.rs b/user/src/lib.rs similarity index 100% rename from user/rcore-ulib/src/lib.rs rename to user/src/lib.rs diff --git a/user/rcore-ulib/src/syscall.rs b/user/src/syscall.rs similarity index 100% rename from user/rcore-ulib/src/syscall.rs rename to user/src/syscall.rs