Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
31bf9c5
feat(std): unify Rust std-aware builds
ZR233 Jun 4, 2026
72f36a1
fix(axbuild): propagate std target C ABI flags
ZR233 Jun 4, 2026
c0829c2
fix(axvisor): link x86 platform symbols in std builds
ZR233 Jun 4, 2026
d2c5c69
fix(starry-kernel): keep rknpu devfs in std builds
ZR233 Jun 4, 2026
126c93b
fix(ax-alloc): register global allocator for std builds
ZR233 Jun 4, 2026
6e2564c
refactor(asm): simplify IRQ handling by removing unnecessary conditio…
ZR233 Jun 4, 2026
cda9308
refactor(kernel_guard): simplify guard struct definitions and remove …
ZR233 Jun 4, 2026
2d5be8d
feat(percpu): add host-test feature for Linux user-space fallback and…
ZR233 Jun 4, 2026
a09369f
fix(task): improve wait queue notification logic and timeout handling
ZR233 Jun 4, 2026
56363fb
refactor(someboot): remove arceos_std conditional checks and related …
ZR233 Jun 4, 2026
0161b16
feat: add host-test feature to multiple components for improved testi…
ZR233 Jun 4, 2026
dd19737
fix(ax-sync): release mutex before waking waiters
ZR233 Jun 4, 2026
1bc1f61
feat(targets): update linker arguments and add eh-frame-header config…
ZR233 Jun 4, 2026
9cacab9
feat(futex): enhance wait/wake logic with readiness checks for improv…
ZR233 Jun 4, 2026
1695423
feat(axtask): add host-test feature for unit testing with host-safe f…
Jun 4, 2026
5bc1331
fix(someboot): correct bss and tls boundaries
Jun 4, 2026
33be774
refactor(axhal): simplify platform feature checks and remove redundan…
ZR233 Jun 5, 2026
22efbd2
refactor(ax-driver): simplify conditional compilation for network fea…
ZR233 Jun 5, 2026
ba68acd
feat(clippy): add support for ax-hal platform features and target arc…
ZR233 Jun 5, 2026
de41115
refactor(axalloc): simplify global allocator configuration by removin…
ZR233 Jun 5, 2026
5ee43c4
Refactor feature flags and compatibility handling across the project
ZR233 Jun 5, 2026
139f7ec
feat(axalloc, axhal): add global allocator feature and update depende…
ZR233 Jun 5, 2026
83b216b
fix(starry-kernel): keep rknpu devfs in std builds
ZR233 Jun 5, 2026
56e2985
feat(build): add support for x86_64-unknown-linux-musl target with ke…
ZR233 Jun 8, 2026
7ba090f
Refactor ArceOS POSIX API: Remove hermit_types and related code
ZR233 Jun 8, 2026
f1c8042
fix(starry-kernel): gate rknpu devfs by feature
ZR233 Jun 8, 2026
70e4c18
fix(ax-task): avoid panicking after affinity migration
ZR233 Jun 8, 2026
23ee58e
fix(someboot): correct x86_64 EFI raw data size
ZR233 Jun 8, 2026
2a6ef7e
fix(starry-kernel): inherit signal mask on clone
ZR233 Jun 8, 2026
78ff67f
refactor(build): update cargo configuration to use standard targets a…
ZR233 Jun 8, 2026
b45917c
fix(starry-tests): pass signed aio syscall counts
ZR233 Jun 8, 2026
64f3a13
refactor(axbuild): select ArceOS C apps via app-c
ZR233 Jun 8, 2026
7579290
fix(axbuild): align std branch with consolidated ArceOS tests
ZR233 Jun 8, 2026
a20108a
fix(axtask): wake CPUs after affinity migration
ZR233 Jun 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 21 additions & 38 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ members = [
"os/arceos/tools/deptool",
"os/arceos/tools/raspi4/chainloader",
"os/arceos/ulib/*",
"os/arceos/ulib/arceos-rust/lib",
"os/axvisor",
"scripts/axbuild",
"test-suit/arceos/rust",
Expand All @@ -133,7 +132,6 @@ members = [
aarch64_sysreg = { version = "0.3.8", path = "virtualization/aarch64_sysreg" }
arm-scmi-rs = { version = "0.1.3", path = "drivers/firmware/arm-scmi-rs" }
arceos-test-suit = { version = "0.3.1", path = "test-suit/arceos/rust" }
arceos-rust = { version = "0.1.2", path = "os/arceos/ulib/arceos-rust", default-features = false }
arm_vcpu = { version = "0.5.10", path = "virtualization/arm_vcpu" }
arm_vgic = { version = "0.4.11", path = "virtualization/arm_vgic" }
ax-alloc = { version = "0.8.0", path = "os/arceos/modules/axalloc", default-features = false }
Expand Down Expand Up @@ -177,6 +175,7 @@ ax-lockdep = { version = "0.1.2", path = "components/lockdep" }
ax-kspin = { version = "0.3.10", path = "components/kspin" }
ax-lazyinit = { version = "0.4.8", path = "components/ax-lazyinit" }
ax-libc = { version = "0.5.16", path = "os/arceos/ulib/axlibc" }
libc = { version = "0.2", default-features = false }
ax-linked-list-r4l = { version = "0.5.5", path = "components/linked_list_r4l" }
ax-log = { version = "0.5.13", path = "os/arceos/modules/axlog" }
ax-memory-addr = { version = "0.6.9", path = "memory/memory_addr" }
Expand Down
10 changes: 8 additions & 2 deletions apps/arceos/std/qemu-smp1/arce_agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ version = "0.2.0"
edition.workspace = true
publish = false

[features]
default = []
arceos = ["dep:ax-std"]

[dependencies]
ax-std = { workspace = true, optional = true }

# minreq: minimal HTTP client, no TLS (we use a local HTTP proxy for HTTPS APIs)
minreq = { version = "2", default-features = false }

Expand All @@ -15,5 +21,5 @@ serde_json = "1"
log = "0.4"
env_logger = "0.11"

[target.'cfg(target_os = "hermit")'.dependencies]
arceos-rust = { workspace = true, default-features = true, features = ["log-level-warn"] }
[package.metadata.axstd]
features = ["log-level-warn"]
52 changes: 26 additions & 26 deletions apps/arceos/std/qemu-smp1/arce_agent/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#[cfg(feature = "arceos")]
use ax_std as _;

// ArceAgent v0.2: Interactive AI Agent on ArceOS Unikernel
//
// Architecture:
Expand All @@ -9,54 +12,51 @@
// Uses minreq for HTTP (no TLS — requires a local HTTP proxy).
// Compiles identically on Linux (for development) and ArceOS (for deployment).

#[cfg(target_os = "hermit")]
use arceos_rust as _;

#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
mod base64;
#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
mod context;
#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
mod hal;
#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
mod lineedit;
#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
mod llm;
#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
mod memory;
#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
mod tools;

#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
use context::ContextManager;
#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
use hal::HalInterface;
#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
use lineedit::LineEditor;
#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
use llm::{ChatMessage, LlmClient};
#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
use log::{debug, error, info};
#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
use memory::Memory;
#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
use tools::{dispatch, tool_catalog};

// ---------------------------------------------------------------------------
// Configuration
// ---------------------------------------------------------------------------

#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
const API_BASE: &str = "http://localhost:8080/v1";
#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
const MODEL: &str = "qwen3.5-plus-thinking";
#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
const MAX_CONTEXT_MESSAGES: usize = 40;
/// Max tool-call rounds per user turn (prevents infinite loops).
#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
const MAX_TOOL_ROUNDS: usize = 10;

#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
const SYSTEM_PROMPT: &str = r#"你是 ArceAgent,一个运行在 ArceOS Unikernel 上的智能机器人助手。

## 你的身体
Expand Down Expand Up @@ -86,7 +86,7 @@ const SYSTEM_PROMPT: &str = r#"你是 ArceAgent,一个运行在 ArceOS Unikern
- 这体现了"云端大脑 + 裸机身体"的架构:你的推理能力来自云端 LLM,执行能力来自本地硬件
- 请记住你是一个有物理实体的机器人,不是纯软件助手"#;

#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
const STARTUP_PROMPT: &str = "你刚刚启动。请先用 read_memory \
工具检查持久记忆中是否有需要注意的内容,然后根据记忆内容和当前状态,\
向用户输出一句简短的欢迎/问候信息。如果记忆中有用户的名字或偏好,\
Expand All @@ -97,7 +97,7 @@ const STARTUP_PROMPT: &str = "你刚刚启动。请先用 read_memory \
// Sends context to LLM, executes any tool calls, prints final text response.
// ---------------------------------------------------------------------------

#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
fn run_llm_turn(
llm: &LlmClient,
ctx: &mut ContextManager,
Expand Down Expand Up @@ -202,10 +202,10 @@ fn main() {
println!("========================================");
println!();

#[cfg(target_os = "hermit")]
#[cfg(feature = "arceos")]
println!("ArceAgent smoke test ready");

#[cfg(not(target_os = "hermit"))]
#[cfg(not(feature = "arceos"))]
{
// init logging (colors, log level)
let mut builder = env_logger::Builder::new();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
std = true
features = []
log = "Info"
max_cpu_num = 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
std = true
features = [
"ax-hal/loongarch64-qemu-virt",
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
std = true
features = []
log = "Info"
max_cpu_num = 1
Expand Down
1 change: 0 additions & 1 deletion apps/arceos/std/qemu-smp1/build-x86_64-unknown-none.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
std = true
features = [
]
log = "Info"
Expand Down
11 changes: 8 additions & 3 deletions apps/arceos/std/qemu-smp1/helloworld/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ edition.workspace = true
authors = ["eternalcomet <mydragonos@outlook.com>"]
publish = false

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
default = []
arceos = ["dep:ax-std"]

[target.'cfg(target_os = "hermit")'.dependencies]
arceos-rust = { workspace = true, default-features = true, features = ["log-level-debug"] }
[dependencies]
ax-std = { workspace = true, optional = true }

[package.metadata.axstd]
features = ["log-level-debug"]
4 changes: 2 additions & 2 deletions apps/arceos/std/qemu-smp1/helloworld/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#[cfg(target_os = "hermit")]
use arceos_rust as _;
#[cfg(feature = "arceos")]
use ax_std as _;

fn main() {
println!("Hello, world!");
Expand Down
10 changes: 7 additions & 3 deletions apps/arceos/std/qemu-smp1/httpclient/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ publish = false

[features]
default = []
dns = ["arceos-rust/dns"]
arceos = ["dep:ax-std", "ax-std/net"]
dns = []

[target.'cfg(target_os = "hermit")'.dependencies]
arceos-rust = { workspace = true, default-features = true, features = ["log-level-debug"] }
[dependencies]
ax-std = { workspace = true, optional = true }

[package.metadata.axstd]
features = ["log-level-debug"]
4 changes: 2 additions & 2 deletions apps/arceos/std/qemu-smp1/httpclient/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::{
net::{TcpStream, ToSocketAddrs},
};

#[cfg(target_os = "hermit")]
use arceos_rust as _;
#[cfg(feature = "arceos")]
use ax_std as _;

#[cfg(feature = "dns")]
const DEST: &str = "ident.me:80";
Expand Down
Loading