OXYGENHUB

flow builds on Haiku: the syscall tier, guest job code and load average are Linux's only; noatime where statvfs knows it (refs #91) 788f57e4d266

Author
Andy McCall @andymccall <[email protected]>
via
agent agent:claude@andymccall <[email protected]> · keyless, under your grant for changes,refs,seal · key 8345aa4b0162
When
· 2026-10-28 22:49 UTC
Signature
◈ sealed by agent:claude@andymccall
Hash
788f57e4d266164f75b969437ceb07a7a54c36b1f5b0627f9429b5b3151027f6
Depends on
077a65242359 21a3ea4aab88 3554afefb6aa 5cf1e8aefbb6 62829d15ef09 c3db750ed96e
Depended on by
010b9a79de79
In bookmarks
main
In tags
v0.5.2 v0.5.3
Edits
12 atoms, 0 tree operations, 5 files

Browse the tree at this change

modified CHANGELOG.md +1 −0
…
4 unchanged lines
5 5
## Unreleased
6 6
7 7
- **Runner builds through the swarm (#84):** a runner in a swarm fetches an offered build as the image its BLAKE3 names, from its site's peers and the hub together, as it fetches images, and checks its size and BLAKE3 before installing it; over HTTP as before when it is in no swarm, the hub has not shared the build yet, or the swarm cannot get it. The hub shares a build the first time it offers it (OxygenHub 0.9.15), so a site's runners fetch it from each other and the hub serves it about once per site. The build stays in the runner's images for its peers.
8 +
- **`flow` builds on Haiku (#91):** with `--no-default-features`, `flow` now builds natively on Haiku R1/beta6 (HaikuPorts' Rust 1.94): the syscall tier, the guest's job code and the load average are Linux's (and Android's) only, and the `noatime` check takes reads as recorded where statvfs has no such flag. It checks pipelines and runs `flow tiers`, which says no tier runs there yet: the host tier (#90) is next.
8 9
- **The WASM tier can be left out of a build (#91):** the `wasm` cargo feature (on by default) carries wasmtime; `--no-default-features` builds `flow` for systems wasmtime does not run on, such as Haiku, whose runners then offer no WASM tier and say why.
9 10
10 11
## 0.5.1 (2026-10-28)
…
122 unchanged lines
modified crates/flow-init/src/prune.rs +6 −1
…
95 unchanged lines
96 96
    if unsafe { libc::statvfs(c.as_ptr(), &mut st) } != 0 {
97 97
        return false;
98 98
    }
99 -
    st.f_flag & libc::ST_NOATIME == 0
99 +
    // A system whose statvfs has no `noatime` flag (Haiku) cannot say:
100 +
    // its reads are taken as recorded, and the access-time check decides.
101 +
    #[cfg(not(target_os = "haiku"))]
102 +
    return st.f_flag & libc::ST_NOATIME == 0;
103 +
    #[cfg(target_os = "haiku")]
104 +
    true
100 105
}
101 106
102 107
#[cfg(unix)]
…
298 unchanged lines
modified crates/flow/src/facts.rs +2 −2
…
102 unchanged lines
103 103
/// The 1-minute load average, times 100, from sysinfo (the kernel's own
104 104
/// numbers behind /proc/loadavg, which an Android app may not read); not
105 105
/// measured on Windows.
106 -
#[cfg(not(unix))]
106 +
#[cfg(not(any(target_os = "linux", target_os = "android")))]
107 107
pub fn load_x100() -> Option<u32> {
108 108
    None
109 109
}
110 110
111 -
#[cfg(unix)]
111 +
#[cfg(any(target_os = "linux", target_os = "android"))]
112 112
pub fn load_x100() -> Option<u32> {
113 113
    let mut i: libc::sysinfo = unsafe { std::mem::zeroed() };
114 114
    // SAFETY: `i` is a writable sysinfo.
…
57 unchanged lines
modified crates/flow/src/lib.rs +5 −3
…
8 unchanged lines
9 9
pub mod facts;
10 10
/// The job-starting code `flow-init` uses in a microVM, shared with the
11 11
/// syscall tier.
12 -
#[cfg(unix)]
12 +
#[cfg(any(target_os = "linux", target_os = "android"))]
13 13
#[path = "../../flow-init/src/job.rs"]
14 14
pub mod guest;
15 15
pub mod home;
…
4 unchanged lines
20 20
pub mod portable;
21 21
pub mod runner;
22 22
pub mod swarm;
23 -
#[cfg(unix)]
23 +
// Linux's (and Android's) namespaces, Landlock, seccomp and cgroups:
24 +
// elsewhere (Windows, Haiku, FreeBSD) the tier says why it is not offered.
25 +
#[cfg(any(target_os = "linux", target_os = "android"))]
24 26
pub mod syscall;
25 -
#[cfg(not(unix))]
27 +
#[cfg(not(any(target_os = "linux", target_os = "android")))]
26 28
#[path = "syscall_none.rs"]
27 29
pub mod syscall;
28 30
pub mod tier;
…
4 unchanged lines
modified crates/flow/src/syscall_none.rs +2 −1
1 1
//! The syscall tier where it cannot be: it is built from Linux's user
2 2
//! namespaces, Landlock, seccomp and cgroups, so a runner elsewhere (a
3 -
//! Windows runner, oxygenflow#83) never offers it, and these say why.
3 +
//! Windows runner, oxygenflow#83; Haiku and FreeBSD, #91, #99) never
4 +
//! offers it, and these say why.
4 5
5 6
use crate::home::Home;
6 7
use crate::microvm::{Outcome, Sink};
…
39 unchanged lines