Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
cargo clippy -Zbuild-std=std,panic_abort --target=x86_64-unknown-hermit --all-targets
cargo clippy -Zbuild-std=std,panic_abort --target=aarch64-unknown-hermit --all-targets
cargo clippy -Zbuild-std=std,panic_abort --target=riscv64gc-unknown-hermit --all-targets
cargo clippy -Zbuild-std=std,panic_abort --target=x86_64-unknown-hermit --package hermit --features common-os

format:
name: Format
Expand Down
18 changes: 12 additions & 6 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ members = [
"examples/vsock",
"hermit",
"hermit-abi",
"hermit-masos",
]

[patch.crates-io]
Expand Down
11 changes: 11 additions & 0 deletions hermit-masos/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "hermit-masos"
edition = "2021"

[dependencies]
hermit-abi = "0.4"
generic_once_cell = "0.1"
libm = "0.2"
spinning_top = "0.3"
take-static = "0.1"
talc = { version = "4.4", default-features = false, features = ["lock_api"] }
File renamed without changes.
3 changes: 3 additions & 0 deletions hermit/src/syscall/mod.rs → hermit-masos/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![feature(thread_local)]

mod math;
#[cfg(target_arch = "x86_64")]
#[macro_use]
Expand Down Expand Up @@ -487,6 +489,7 @@ pub extern "C" fn sys_getaddrinfo(
-22
}

#[expect(clippy::missing_safety_doc)]
#[no_mangle]
pub unsafe extern "C" fn _start(_argc: i32, _argv: *const *const c_char) -> ! {
extern "C" {
Expand Down
File renamed without changes.
14 changes: 7 additions & 7 deletions hermit/src/syscall/x86_64.rs → hermit-masos/src/x86_64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ use core::arch::asm;
#[macro_export]
macro_rules! syscall {
($arg0:expr) => {
$crate::syscall::x86_64::syscall0($arg0 as u64)
$crate::x86_64::syscall0($arg0 as u64)
};

($arg0:expr, $arg1:expr) => {
$crate::syscall::x86_64::syscall1($arg0 as u64, $arg1 as u64)
$crate::x86_64::syscall1($arg0 as u64, $arg1 as u64)
};

($arg0:expr, $arg1:expr, $arg2:expr) => {
$crate::syscall::x86_64::syscall2($arg0 as u64, $arg1 as u64, $arg2 as u64)
$crate::x86_64::syscall2($arg0 as u64, $arg1 as u64, $arg2 as u64)
};

($arg0:expr, $arg1:expr, $arg2:expr, $arg3:expr) => {
$crate::syscall::x86_64::syscall3($arg0 as u64, $arg1 as u64, $arg2 as u64, $arg3 as u64)
$crate::x86_64::syscall3($arg0 as u64, $arg1 as u64, $arg2 as u64, $arg3 as u64)
};

($arg0:expr, $arg1:expr, $arg2:expr, $arg3:expr, $arg4:expr) => {
$crate::syscall::x86_64::syscall4(
$crate::x86_64::syscall4(
$arg0 as u64,
$arg1 as u64,
$arg2 as u64,
Expand All @@ -30,7 +30,7 @@ macro_rules! syscall {
};

($arg0:expr, $arg1:expr, $arg2:expr, $arg3:expr, $arg4:expr, $arg5:expr) => {
$crate::syscall::x86_64::syscall5(
$crate::x86_64::syscall5(
$arg0 as u64,
$arg1 as u64,
$arg2 as u64,
Expand All @@ -41,7 +41,7 @@ macro_rules! syscall {
};

($arg0:expr, $arg1:expr, $arg2:expr, $arg3:expr, $arg4:expr, $arg5:expr, $arg6:expr) => {
$crate::syscall::x86_64::syscall6(
$crate::x86_64::syscall6(
$arg0 as u64,
$arg1 as u64,
$arg2 as u64,
Expand Down
9 changes: 0 additions & 9 deletions hermit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ keywords = ["unikernel", "libos"]
categories = ["os"]
links = "hermit"

[dependencies]
hermit-abi = { version = "0.4", optional = true }
generic_once_cell = { version = "0.1", optional = true }
libm = { version = "0.2", optional = true }
spinning_top = { version = "0.3", optional = true }
take-static = { version = "0.1", optional = true }
talc = { version = "4.4", default-features = false, features = ["lock_api"], optional = true }

[features]
default = [
"acpi",
Expand Down Expand Up @@ -71,7 +63,6 @@ udp = []
vga = []
virtio-net = []
vsock = []
common-os = ["hermit-abi", "generic_once_cell", "libm", "spinning_top", "take-static", "talc"]

[build-dependencies]
cc = "1"
Expand Down
3 changes: 1 addition & 2 deletions hermit/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ fn main() {
let runs_clippy =
env::var_os("CARGO_CFG_FEATURE").is_some_and(|feature| feature == "cargo-clippy");
let is_docs_rs = env::var_os("DOCS_RS").is_some();
let is_common_os = has_feature("common-os");
if !targets_hermit || runs_clippy || is_docs_rs || is_common_os {
if !targets_hermit || runs_clippy || is_docs_rs {
return;
}

Expand Down
7 changes: 0 additions & 7 deletions hermit/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(
all(target_os = "hermit", feature = "common-os"),
feature(thread_local)
)]

#[cfg(all(target_os = "hermit", feature = "common-os"))]
mod syscall;
Loading