[FEATURE] Run the complete admitted compiler and development toolchain inside EriX #7

Open
opened 2026-09-12 07:56:29 +02:00 by erikinkinen · 0 comments
Owner

Problem and motivation

Producing an EriX target object on Linux does not show that rustc, Cargo and packaging tools execute on EriX. The entire selected tool closure needs a real EriX host port and functional authority-negative validation.

Proposed behavior and scope

Build the compiler binaries, LLVM libraries, Rust standard-library OS bindings and required C/C++ runtimes from their selected sources for EriX, linked against its libc/sysroot. The initial EriX-hosted compiler may be cross-built on Linux. The delivered extended development image must then rebuild the selected upstream Rust/LLVM toolchain inside EriX using its supplied offline recipes and explicit bootstrap compiler, without unrecorded porting changes or host assistance. Validate exact runtime linkage and execute representative compiler workloads inside a confined EriX realm.

Pin offline upstream sources and recipes, port Rust/LLVM and their actual runtime support, and bring up the declared Python, build, Git, archive, text, Autotools, image and documentation tools. Admit tools only after representative functional workloads and dependency closure checks.

This issue records planned work; its unchecked criteria are not implementation proof. The normative basis is Phase 6 and AC1–AC24.

Authority, security and reliability

Execute each tool inside a bounded realm with no hidden host executor, Linux syscall fallback, network or registry download. bootloader#1 scoped admission must protect newly built build scripts, proc macros, plugins and test programs before they execute. Missing or revoked grants produce explicit failures and full teardown.

Apply the priority order: security, reliability, then performance. Keep suspected vulnerabilities in the repository’s restricted SECURITY.md reporting channel.

Acceptance criteria

  • Pin exact upstream sources, compiler versions, recipe options and licenses for
    every selected tool/runtime; create a dependency-ordered offline bootstrap graph
    distinguishing build-machine, EriX-host and output targets.
  • Implement/review EriX target support and sysroot integration for Rust/LLVM/C
    tooling, including actual std OS bindings over lib-cstd, TLS, threads, process, files and
    time. A target JSON alone is not host support.
  • Build target core, alloc, std, proc_macro, compiler runtime and test
    libraries; separate imported runtime payloads from trusted native component dependencies and
    record each runtime link closure.
  • Cross-build EriX-hosted rustc, cargo, rustdoc, rustfmt, clippy-driver, LLVM code-generation libraries and Rust linker support from selected upstream sources against EriX libc/sysroot and Rust OS bindings; execute each within an EriX realm. Retain exact static/dynamic link closure evidence; copying or merely relabeling Linux binaries is not a compiler port.
  • Build from source and verify EriX-hosted LLVM tools against the EriX sysroot: clang, clang++, lld, llvm-ar, llvm-ranlib, llvm-nm, llvm-objcopy, llvm-strip, llvm-readobj, llvm-readelf, llvm-size, and llvm-config when the recipe requires it.
  • Build only declared compiler-rt, libunwind, C++ runtime and compression/runtime
    dependencies; test C/C++ allocation, TLS, threads and exceptions as required by those exact
    compiler binaries.
  • Port/verify Python 3 and required standard modules, including the selected
    compression, FFI and optional database extensions used by EriX scripts.
  • Port/verify CMake, Ninja, GNU make, pkgconf/pkg-config and declared bash use; test
    generated build rules, subprocess pipes and parallel job limits.
  • Port/verify offline Git operations: init/status/diff/log/checkout, exact local
    revision resolution and offline Cargo Git dependency use; disable fetch/network paths and
    preserve exact commit identity in manifests and caches.
  • Port/verify archive/compression tools: tar, gzip, xz, zstd and bzip2, with
    reproducible round trips, permissions, symlinks and path-escape rejection.
  • Port/verify required patch/diff/cmp/find/grep/sed/awk/sort/install and
    file/object-probe behavior not supplied by native tools; record exact options.
  • Port/verify extended-dev Autotools support: m4, autoconf, automake, libtool, bison,
    flex and Perl with a representative configure/build fixture.
  • Admit dependency-only zlib/bzip2/liblzma/zstd/libarchive/libuv/libffi/
    sqlite/pcre2/expat/gettext/iconv/terminfo/readline components only when selected tools require
    them; disable optional TLS/download/network features for Phase 6.
  • Resolve required image/filesystem, Markdown and TeX tool dependencies through
    integration#4 or clean-room equivalents. No unlisted helper may run on the external host during the
    final build to fill a missing guest tool.
  • Require every tool's smoke command, deterministic exit and minimal startup
    capability test before admission; version output alone is insufficient.
  • Run functional fixtures: Rust program/crate, offline Cargo workspace, build script
    and proc macro, C/C++ compile/link, Python bootstrap scripts, CMake/Ninja/make, local Git and
    archive/text round trips.
  • Run each tool class under missing/revoked grants, uid 0 metadata, out-of-tree
    paths, device names and unavailable network; verify denial and teardown without a
    compiler/tool-specific launch exception.
  • Profile real compiler/workspace builds and fix evidenced substrate bottlenecks
    through integration#3, preserving per-job resource ceilings and exact errors.

For each implementation slice, retain actual formatting, strict Clippy, unit/doctest and warning-denied build results for all altered Rust repositories and valid configurations. Add relevant runtime VM coverage, monitor older unit/VM regressions in exact-head CI, and update canonical component documents and affected technical-manual/API material. Every authored code file must remain below 1,000 physical lines, with meaningful inline documentation and missing_docs enforcement in Rust crates.

  • Rebuild the selected upstream Rust/LLVM toolchain and required runtime closure inside an extended development EriX realm using the supplied offline sources, recipes, dependencies and cross-built EriX-hosted bootstrap compiler/sysroot. Require the delivered build to work without unrecorded porting changes, implicit downloads, Linux executables or host build delegation. Verify EriX libc/ABI linkage, execute the guest-built tools and compile/link/run Rust and C/C++ fixtures, including build scripts and proc macros. Use the rebuilt compiler for at least one required full EriX build. Retain exact source/patch/bootstrap/tool/runtime hashes, complete logs, actual outcomes and measured memory/time requirements under explicit build quotas. Cross-compilation and version output alone do not satisfy this acceptance.

Alternatives and tradeoffs

Version output and target JSON are insufficient evidence of host support. Validate actual std/TLS/thread/process/file behavior and allow dependency-only libraries solely when the pinned workload requires them.

Tracking and rollout

Dependencies: posixd#2, kernel#1, posixd#3, lib-cstd#1, dynlinkd#1, exsh#1, integration#4, bootloader#1

Dependencies identify required contracts and closure gates; preparatory inventory/design can proceed in parallel under one owner per edited file. Link bounded implementation issues and their PRs here before claiming acceptance. Use feature/posix-compat, regular signed commits in the canonical contribution format, and WIP PRs linked to the exact coherent component graph. All cross-repository Cargo/catalog selections and CI helpers use full 40-character lowercase commit hashes, including transitive dependencies; do not substitute branch, tag or implicit HEAD selection.

Close criteria only with their own reviewed deliverables and validation evidence. Pending, skipped, cancelled, failed or predecessor-only results remain distinct. Keep main images unchanged until explicit promotion direction; technical completion does not authorize merges, release tags or publication.

## Problem and motivation Producing an EriX target object on Linux does not show that rustc, Cargo and packaging tools execute on EriX. The entire selected tool closure needs a real EriX host port and functional authority-negative validation. ## Proposed behavior and scope Build the compiler binaries, LLVM libraries, Rust standard-library OS bindings and required C/C++ runtimes from their selected sources for EriX, linked against its libc/sysroot. The initial EriX-hosted compiler may be cross-built on Linux. The delivered extended development image must then rebuild the selected upstream Rust/LLVM toolchain inside EriX using its supplied offline recipes and explicit bootstrap compiler, without unrecorded porting changes or host assistance. Validate exact runtime linkage and execute representative compiler workloads inside a confined EriX realm. Pin offline upstream sources and recipes, port Rust/LLVM and their actual runtime support, and bring up the declared Python, build, Git, archive, text, Autotools, image and documentation tools. Admit tools only after representative functional workloads and dependency closure checks. This issue records planned work; its unchecked criteria are not implementation proof. The normative basis is [Phase 6 and AC1–AC24](https://git.erikinkinen.fi/erix/docs/src/branch/main/phases/6.md). ## Authority, security and reliability Execute each tool inside a bounded realm with no hidden host executor, Linux syscall fallback, network or registry download. [bootloader#1](https://git.erikinkinen.fi/erix/bootloader/issues/1) scoped admission must protect newly built build scripts, proc macros, plugins and test programs before they execute. Missing or revoked grants produce explicit failures and full teardown. Apply the priority order: security, reliability, then performance. Keep suspected vulnerabilities in the repository’s restricted SECURITY.md reporting channel. ## Acceptance criteria - [ ] Pin exact upstream sources, compiler versions, recipe options and licenses for every selected tool/runtime; create a dependency-ordered offline bootstrap graph distinguishing build-machine, EriX-host and output targets. - [ ] Implement/review EriX target support and sysroot integration for Rust/LLVM/C tooling, including actual `std` OS bindings over `lib-cstd`, TLS, threads, process, files and time. A target JSON alone is not host support. - [ ] Build target `core`, `alloc`, `std`, `proc_macro`, compiler runtime and `test` libraries; separate imported runtime payloads from trusted native component dependencies and record each runtime link closure. - [ ] Cross-build EriX-hosted `rustc`, `cargo`, `rustdoc`, `rustfmt`, `clippy-driver`, LLVM code-generation libraries and Rust linker support from selected upstream sources against EriX libc/sysroot and Rust OS bindings; execute each within an EriX realm. Retain exact static/dynamic link closure evidence; copying or merely relabeling Linux binaries is not a compiler port. - [ ] Build from source and verify EriX-hosted LLVM tools against the EriX sysroot: `clang`, `clang++`, `lld`, `llvm-ar`, `llvm-ranlib`, `llvm-nm`, `llvm-objcopy`, `llvm-strip`, `llvm-readobj`, `llvm-readelf`, `llvm-size`, and `llvm-config` when the recipe requires it. - [ ] Build only declared compiler-rt, libunwind, C++ runtime and compression/runtime dependencies; test C/C++ allocation, TLS, threads and exceptions as required by those exact compiler binaries. - [ ] Port/verify Python 3 and required standard modules, including the selected compression, FFI and optional database extensions used by EriX scripts. - [ ] Port/verify CMake, Ninja, GNU make, pkgconf/pkg-config and declared bash use; test generated build rules, subprocess pipes and parallel job limits. - [ ] Port/verify offline Git operations: init/status/diff/log/checkout, exact local revision resolution and offline Cargo Git dependency use; disable fetch/network paths and preserve exact commit identity in manifests and caches. - [ ] Port/verify archive/compression tools: tar, gzip, xz, zstd and bzip2, with reproducible round trips, permissions, symlinks and path-escape rejection. - [ ] Port/verify required patch/diff/cmp/find/grep/sed/awk/sort/install and file/object-probe behavior not supplied by native tools; record exact options. - [ ] Port/verify extended-dev Autotools support: m4, autoconf, automake, libtool, bison, flex and Perl with a representative configure/build fixture. - [ ] Admit dependency-only zlib/bzip2/liblzma/zstd/libarchive/libuv/libffi/ sqlite/pcre2/expat/gettext/iconv/terminfo/readline components only when selected tools require them; disable optional TLS/download/network features for Phase 6. - [ ] Resolve required image/filesystem, Markdown and TeX tool dependencies through [integration#4](https://git.erikinkinen.fi/erix/integration/issues/4) or clean-room equivalents. No unlisted helper may run on the external host during the final build to fill a missing guest tool. - [ ] Require every tool's smoke command, deterministic exit and minimal startup capability test before admission; version output alone is insufficient. - [ ] Run functional fixtures: Rust program/crate, offline Cargo workspace, build script and proc macro, C/C++ compile/link, Python bootstrap scripts, CMake/Ninja/make, local Git and archive/text round trips. - [ ] Run each tool class under missing/revoked grants, uid 0 metadata, out-of-tree paths, device names and unavailable network; verify denial and teardown without a compiler/tool-specific launch exception. - [ ] Profile real compiler/workspace builds and fix evidenced substrate bottlenecks through [integration#3](https://git.erikinkinen.fi/erix/integration/issues/3), preserving per-job resource ceilings and exact errors. For each implementation slice, retain actual formatting, strict Clippy, unit/doctest and warning-denied build results for all altered Rust repositories and valid configurations. Add relevant runtime VM coverage, monitor older unit/VM regressions in exact-head CI, and update canonical component documents and affected technical-manual/API material. Every authored code file must remain below 1,000 physical lines, with meaningful inline documentation and missing_docs enforcement in Rust crates. - [ ] Rebuild the selected upstream Rust/LLVM toolchain and required runtime closure inside an extended development EriX realm using the supplied offline sources, recipes, dependencies and cross-built EriX-hosted bootstrap compiler/sysroot. Require the delivered build to work without unrecorded porting changes, implicit downloads, Linux executables or host build delegation. Verify EriX libc/ABI linkage, execute the guest-built tools and compile/link/run Rust and C/C++ fixtures, including build scripts and proc macros. Use the rebuilt compiler for at least one required full EriX build. Retain exact source/patch/bootstrap/tool/runtime hashes, complete logs, actual outcomes and measured memory/time requirements under explicit build quotas. Cross-compilation and version output alone do not satisfy this acceptance. ## Alternatives and tradeoffs Version output and target JSON are insufficient evidence of host support. Validate actual std/TLS/thread/process/file behavior and allow dependency-only libraries solely when the pinned workload requires them. ## Tracking and rollout Dependencies: [posixd#2](https://git.erikinkinen.fi/erix/posixd/issues/2), [kernel#1](https://git.erikinkinen.fi/erix/kernel/issues/1), [posixd#3](https://git.erikinkinen.fi/erix/posixd/issues/3), [lib-cstd#1](https://git.erikinkinen.fi/erix/lib-cstd/issues/1), [dynlinkd#1](https://git.erikinkinen.fi/erix/dynlinkd/issues/1), [exsh#1](https://git.erikinkinen.fi/erix/exsh/issues/1), [integration#4](https://git.erikinkinen.fi/erix/integration/issues/4), [bootloader#1](https://git.erikinkinen.fi/erix/bootloader/issues/1) Dependencies identify required contracts and closure gates; preparatory inventory/design can proceed in parallel under one owner per edited file. Link bounded implementation issues and their PRs here before claiming acceptance. Use `feature/posix-compat`, regular signed commits in the canonical contribution format, and WIP PRs linked to the exact coherent component graph. All cross-repository Cargo/catalog selections and CI helpers use full 40-character lowercase commit hashes, including transitive dependencies; do not substitute branch, tag or implicit HEAD selection. Close criteria only with their own reviewed deliverables and validation evidence. Pending, skipped, cancelled, failed or predecessor-only results remain distinct. Keep main images unchanged until explicit promotion direction; technical completion does not authorize merges, release tags or publication.
erikinkinen changed title from [FEATURE] [P14] Run the complete admitted compiler and development toolchain inside EriX to [FEATURE] Run the complete admitted compiler and development toolchain inside EriX 2026-09-12 08:02:07 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/integration#7
No description provided.