File tree Expand file tree Collapse file tree 6 files changed +33
-16
lines changed
Expand file tree Collapse file tree 6 files changed +33
-16
lines changed Original file line number Diff line number Diff line change 11[alias ]
2- xtask = " run --manifest-path xtask/Cargo.toml --"
2+ xtask = " run --bin xtask --no-default-features --features xtask --"
33
44[env ]
55AX_CONFIG_PATH = { value = " .axconfig.toml" , relative = true }
Original file line number Diff line number Diff line change 11[package ]
22name = " arceos-helloworld"
3- version = " 0.3.0 "
3+ version = " 0.4.1 "
44edition = " 2024"
55authors = [" Yuekai Jia <equation618@gmail.com>" , " Yu Chen <yuchen@tsinghua.edu.cn>" ]
66description = " A simple helloworld crate (from crates.io) for ArceOS"
@@ -9,12 +9,29 @@ homepage = "https://github.com/arceos-org/app-helloworld"
99repository = " https://github.com/arceos-org/app-helloworld/tree/dev"
1010keywords = [" arceos" , " example" ]
1111categories = [" os" , " no-std" ]
12+ include = [
13+ " src/**" ,
14+ " build.rs" ,
15+ " configs/**" ,
16+ " xtask/src/**" ,
17+ " .cargo/config.toml" ,
18+ " rust-toolchain.toml" ,
19+ " README.md" ,
20+ " LICENSE*" ,
21+ ]
1222
1323[features ]
1424default = [" axstd" ]
1525axstd = [" dep:axstd" ]
26+ xtask = [" dep:clap" ]
27+
28+ [[bin ]]
29+ name = " xtask"
30+ path = " xtask/src/main.rs"
31+ required-features = [" xtask" ]
1632
1733[dependencies ]
1834axstd = { version = " 0.2.2-preview.1" , features = [" defplat" ], optional = true }
35+ clap = { version = " 4" , features = [" derive" ], optional = true }
1936
2037[profile .release ]
Original file line number Diff line number Diff line change @@ -50,6 +50,12 @@ A standalone Hello World application running on [ArceOS](https://github.com/arce
5050## Quick Start
5151
5252``` bash
53+ # install cargo-clone sub-command
54+ cargo install cargo-clone
55+ # get source code of arceos-helloworld crate from crates.io
56+ cargo clone arceos-helloworld
57+ # into crate dir
58+ cd arceos-helloworld
5359# Build and run on RISC-V 64 QEMU (default)
5460cargo xtask run
5561
Original file line number Diff line number Diff line change 22profile = " minimal"
33channel = " nightly-2025-12-12"
44components = [" rust-src" , " llvm-tools" ]
5- targets = [" riscv64gc-unknown-none-elf" ]
5+ targets = [
6+ " riscv64gc-unknown-none-elf" ,
7+ " aarch64-unknown-none-softfloat" ,
8+ " x86_64-unknown-none" ,
9+ " loongarch64-unknown-none" ,
10+ ]
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -66,13 +66,9 @@ fn arch_info(arch: &str) -> ArchInfo {
6666 }
6767}
6868
69- /// Locate the project root (parent of xtask/) .
69+ /// Locate the project root.
7070fn project_root ( ) -> PathBuf {
71- let xtask_dir = PathBuf :: from ( env ! ( "CARGO_MANIFEST_DIR" ) ) ;
72- xtask_dir
73- . parent ( )
74- . expect ( "xtask must be inside the project directory" )
75- . to_path_buf ( )
71+ PathBuf :: from ( env ! ( "CARGO_MANIFEST_DIR" ) )
7672}
7773
7874/// Copy the architecture-specific axconfig to .axconfig.toml
You can’t perform that action at this time.
0 commit comments