update `user` crate to 2018 edition. add travis for user

toolchain_update
WangRunji 6 years ago
parent e1f93a179a
commit 4034a473bd

@ -38,4 +38,5 @@ before_script:
- (test -x $HOME/.cargo/bin/bootimage || cargo install bootimage) - (test -x $HOME/.cargo/bin/bootimage || cargo install bootimage)
script: script:
- cd kernel && make build arch=$ARCH - cd kernel && make build arch=$ARCH && cd ..
- cd user && make arch=$ARCH

@ -2,6 +2,7 @@
name = "ucore-user-programs" name = "ucore-user-programs"
version = "0.1.0" version = "0.1.0"
authors = ["Runji Wang <wangrunji0408@163.com>"] authors = ["Runji Wang <wangrunji0408@163.com>"]
edition = "2018"
[dependencies] [dependencies]
"ucore-ulib" = { path = "ucore-ulib" } "ucore-ulib" = { path = "ucore-ulib" }

@ -1,4 +1,4 @@
# arch = {riscv32, x86_64} # arch = {riscv32, x86_64, aarch64}
arch := riscv32 arch := riscv32
all: all:

@ -2,5 +2,6 @@
name = "ucore-ulib" name = "ucore-ulib"
version = "0.1.0" version = "0.1.0"
authors = ["WangRunji <wangrunji0408@163.com>"] authors = ["WangRunji <wangrunji0408@163.com>"]
edition = "2018"
[dependencies] [dependencies]

@ -1,4 +1,4 @@
use syscall::sys_exit; use crate::syscall::sys_exit;
use core::alloc::Layout; use core::alloc::Layout;
use core::panic::PanicInfo; use core::panic::PanicInfo;
@ -17,7 +17,7 @@ pub extern fn _start(_argc: isize, _argv: *const *const u8) -> ! {
#[lang = "eh_personality"] #[lang = "eh_personality"]
fn eh_personality() {} fn eh_personality() {}
#[panic_implementation] #[panic_handler]
fn panic(info: &PanicInfo) -> ! { fn panic(info: &PanicInfo) -> ! {
let location = info.location().unwrap(); let location = info.location().unwrap();
let message = info.message().unwrap(); let message = info.message().unwrap();

@ -1,7 +1,6 @@
#![no_std] #![no_std]
#![feature(asm)] #![feature(asm)]
#![feature(lang_items)] #![feature(lang_items)]
#![feature(panic_implementation)]
#![feature(panic_info_message)] #![feature(panic_info_message)]
#![feature(linkage)] #![feature(linkage)]
#![feature(compiler_builtins_lib)] #![feature(compiler_builtins_lib)]

Loading…
Cancel
Save