Skip to content

Commit 9b7ff0d

Browse files
publish v0.4.5
1 parent c066b4f commit 9b7ff0d

File tree

5 files changed

+31
-2
lines changed

5 files changed

+31
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "arceos-helloworld"
3-
version = "0.4.4"
3+
version = "0.4.5"
44
edition = "2024"
55
authors = ["Yuekai Jia <equation618@gmail.com>", "Yu Chen <yuchen@tsinghua.edu.cn>"]
66
description = "A simple helloworld crate (from crates.io) for ArceOS"
@@ -18,6 +18,7 @@ include = [
1818
"rust-toolchain.toml",
1919
"README.md",
2020
"LICENSE*",
21+
"exercise/**",
2122
]
2223

2324
[features]

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,17 @@ cross-compilation and QEMU execution:
135135
| `build.rs` | Locates the linker script generated by `axhal` and passes it to the linker |
136136
| `configs/*.toml` | Pre-generated platform configuration for each architecture |
137137

138+
## Exercise
139+
### Requirements
140+
Based on the `arceos-helloworld` kernel component and the reference codes under the `exercise` directory, implement a new kernel component named `arceos-helloworld-with-color` that supports colored print output.
141+
142+
### Expectation
143+
The output of the string "Hello, world!" shall be displayed with color. (No specific color requirements are imposed.)
144+
145+
### Tips
146+
Modifications made on `arceos` components at different levels will affect different scopes of output.
147+
For example, modifying `axstd` may only affect the output of the println! macro; modifying `axhal` may also affect the color of ArceOS startup information.
148+
138149
## ArceOS Tutorial Crates
139150

140151
This crate is part of a series of tutorial crates for learning OS development with [ArceOS](https://github.com/arceos-org/arceos). The crates are organized by functionality and complexity progression:

exercise/Cargo.toml.orig

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

exercise/src/main.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#![cfg_attr(feature = "axstd", no_std)]
2+
#![cfg_attr(feature = "axstd", no_main)]
3+
4+
#[cfg(feature = "axstd")]
5+
use axstd::println;
6+
7+
#[cfg_attr(feature = "axstd", no_mangle)]
8+
fn main() {
9+
println!("[WithColor]: Hello, Arceos!");
10+
}

0 commit comments

Comments
 (0)