WIP: Add explicit C runtime components #3
Closed
erikinkinen
wants to merge 91 commits from
feature/posix-compat into main
pull from: feature/posix-compat
merge into: erix:main
erix:main
erix:feature/offline-workspace-source-catalog
erix:feature/remaining-memory-string-family
erix:feature/initialized-thread-main-c418114
erix:feature/initialized-thread-main-f90e6ad
erix:feature/initialized-thread-runtime-68fd72b
erix:feature/locale-byte-comparisons-9a95378
erix:feature/cargo-cleanup-evidence-5905f80
erix:feature/closed-runtime-custody-39c62c7
erix:feature/closed-runtime-custody-b001946
erix:feature/runtime-dependency-routing-c8778a1
erix:feature/bounded-strings-current-main-8df9df7
erix:feature/bounded-string-span-reconciled-26bd172
erix:feature/initialized-thread-images
erix:feature/bounded-string-copy-concatenation
erix:feature/string-set-queries-reconciled-8cace44
erix:feature/bounded-writers-reconciled-2000b5c
erix:feature/thread-image-rustdoc-213525a
erix:feature/qualify-105-9842dc5
erix:feature/terminal-symbol-coverage-merge-ready-a3d1e0dd
erix:feature/native-c-owner-cohort-merge-ready-762b46b0
erix:feature/thematic-runtime-command-owner-merge-ready-3db6ea3d
erix:feature/physical-terminal-modem-reception-merge-ready-b8355361
erix:feature/physical-terminal-line-configuration-merge-ready-a455e079
erix:feature/terminal-timed-break-merge-ready-c8651d49
erix:feature/terminal-software-flow-merge-ready-dba77fad
erix:feature/terminal-drain-deferred-settings-merge-ready-4ba8a472
erix:feature/terminal-queue-flush-merge-ready-566a529c
erix:feature/namespaced-terminal-attributes-merge-ready-79e125e8
erix:feature/native-producer-cleanup-receipts
erix:feature/caller-owned-termios-speeds-merge-ready-408f60a7
erix:feature/terminal-identification-window-controls-merge-ready-5007e5e4
erix:feature/explicit-c-clock-sleep-merge-ready-defebcf2
erix:feature/checked-c-time-arithmetic-merge-ready-8bec6563
erix:feature/caller-owned-multibyte-conversion-merge-ready-9c424681
erix:feature/mediated-c-pipe-creation-merge-ready-09240feb
erix:feature/mediated-poll-select-merge-ready-f4908182
erix:feature/native-command-lifetime-closure-merge-ready-0de5d405
erix:feature/mediated-directory-iteration-merge-ready-5df7b52c
erix:feature/mediated-process-directory-reports-merge-ready-46c5a51e
erix:feature/freestanding-string-call-controls-merge-ready-751731dd
erix:feature/cxx-end-copy-refusal-diagnostics-merge-ready-5422af14
erix:feature/counted-c-file-timestamps-merge-ready-8fd5fbde
erix:feature/mediated-c-file-interfaces-merge-ready-88a608ef
erix:feature/generated-cargo-evidence-retirement-merge-ready-c63ca132
erix:feature/generated-cargo-evidence-retirement-merge-ready-079bc00b
erix:feature/checked-runtime-helper-closure-merge-ready-1b16f95d
erix:feature/checked-runtime-helper-closure-merge-ready-0caf969f
erix:feature/process-root-descriptor-adapters-merge-ready-15e72138
erix:feature/mutable-process-environment-merge-ready-bf3fd43c
erix:feature/caller-owned-string-tokenization-merge-ready-26200b2a
erix:feature/caller-owned-string-tokenization-merge-ready-15850f6b
erix:feature/heap-owned-string-duplication-merge-ready-50d7996c
erix:feature/native-process-startup-exit-merge-ready-95249cec
erix:feature/heap-owned-string-duplication-merge-ready-1239c6a6
erix:feature/native-process-startup-exit-merge-ready-06cd4f4d
erix:feature/native-process-startup-exit-merge-ready-2055caa2
erix:feature/shared-process-heap-merge-ready-3f6b2353
erix:feature/shared-process-heap-merge-ready-66e7ead8
erix:feature/shared-process-heap-merge-ready-d9c56e70
erix:feature/cxx-memory-string-headers-merge-ready-e25a9efa
erix:feature/destination-end-byte-copy-merge-ready-a535f50a
erix:feature/destination-end-string-copies-merge-ready-72ecd27a
erix:feature/destination-end-string-copies-merge-ready-8b7dc2a1
erix:feature/fixed-locale-character-operations-merge-ready-06dd1a8b
erix:feature/fixed-locale-integer-conversions-merge-ready-a939433f
erix:feature/fixed-c-error-catalog-merge-ready-8519ed2d
erix:feature/constant-storage-substring-search-merge-ready-e5e99498
erix:feature/terminal-symbol-coverage
erix:feature/native-c-pure-owner-cohort
erix:feature/canonical-native-owner-cohort-merge-ready-132c7116
erix:feature/native-runtime-source-profile-merge-ready-46258a04
erix:feature/canonical-native-owner-cohort
erix:feature/native-runtime-source-profile
erix:feature/generic-caller-native-owner-merge-ready-6cdd34c8
erix:feature/native-memory-intrinsics
erix:feature/current-locale-multibyte
erix:feature/native-c-owner-cohort
erix:feature/freestanding-string-call-controls
erix:feature/fixed-locale-character-operations
erix:feature/fixed-c-error-catalog
erix:feature/dependency-review-policy-merge-ready-bdfcfbd3
erix:feature/runtime-preparation-diagnostics-merge-ready-3c35f2d9
erix:fix/runtime-preparation-diagnostics-merge-ready-3c35f2d9
erix:feature/source-closure-entry-diagnostics-merge-ready-3f309b84
erix:fix/source-closure-entry-diagnostics-merge-ready-3f309b84
erix:feature/generic-caller-native-owner-merge-ready-e90c0113
erix:perf/generic-caller-native-owner-merge-ready-e90c0113
erix:feature/standard-multibyte-headers-merge-ready-d4324a13
erix:feature/native-process-owner-cohort-merge-ready-31cd92b2
erix:feature/terminal-speed-alias-controls-merge-ready-8c4601e0
erix:feature/cxx-header-callback-controls-merge-ready-e7cfcc9e
erix:feature/explicit-c-sort-search-merge-ready-b7495bce
erix:feature/native-runtime-scope-contract-merge-ready-0b8dcc3b
erix:feature/native-c-owner-compiler-cohort
erix:feature/owned-directory-streams
erix:feature/bounded-string-span-queries
erix:feature/counted-c-file-timestamps
erix:feature/mediated-c-file-interfaces
erix:feature/generated-cargo-evidence-retirement
erix:feature/explicit-c-clock-sleep
erix:feature/terminal-identification-window-controls
erix:feature/mediated-c-pipe-creation
erix:feature/mediated-poll-select
erix:feature/mediated-process-directory-reports
erix:feature/compatibility-runtime-packaging
erix:feature/thread-image-alignment
erix:fix/ci-owned-helper-exclusion
erix:feature/locale-byte-string-comparisons
erix:feature/runtime-custody-hold-diagnostics
erix:fix/workspace-companion-link-ownership
erix:perf/generic-caller-native-owner
erix:feature/raw-live-scope-freshness
erix:fix/runtime-preparation-diagnostics
erix:fix/source-closure-entry-diagnostics
erix:fix/retained-rust-probe-dependencies
erix:fix/deliberate-crash-core-policy
erix:fix/startup-source-contract
erix:fix/wide-string-link-rejection
erix:feature/native-c-owner-input-cohort
erix:feature/standard-multibyte-headers
erix:fix/runtime-toolchain-compatibility
erix:fix/retained-runtime-probe-dependencies
erix:fix/ci-workspace-source-exclusions
erix:build/native-c-owner-compiler-cohort
erix:feature/process-thread-locales
erix:feature/owned-thread-runtime-state
erix:feature/cxx-memory-string-headers
erix:feature/dependency-review-policy
erix:feature/destination-end-byte-copy
erix:feature/destination-end-string-copies
erix:feature/explicit-c-sort-search
erix:feature/constant-storage-substring-search
erix:feature/fixed-locale-integer-conversions
erix:feature/native-runtime-scope-contract
erix:feature/fixture-rustdoc-boundaries
erix:feature/freestanding-length-probe
erix:feature/string-span-probe-framing
erix:feature/native-producer-receipt-contract
erix:feature/freestanding-c-memory
erix:feature/readonly-byte-string-queries
erix:feature/native-process-owner-cohort
erix:feature/terminal-speed-alias-controls
erix:feature/physical-terminal-modem-reception
erix:feature/posix-runtime-formatting
erix:feature/thematic-runtime-command-owner
erix:feature/physical-terminal-line-configuration
erix:feature/terminal-timed-break
erix:feature/terminal-drain-deferred-settings
erix:feature/terminal-queue-flush
erix:feature/terminal-software-flow
erix:feature/caller-owned-termios-speeds
erix:feature/namespaced-terminal-attributes
erix:feature/checked-c-time-arithmetic
erix:feature/caller-owned-multibyte-conversion
erix:feature/native-command-lifetime-closure
erix:feature/cxx-header-callback-controls
erix:feature/mediated-directory-iteration
erix:feature/cxx-end-copy-refusal-diagnostics
erix:feature/checked-runtime-helper-closure
erix:feature/process-root-descriptor-adapters
erix:feature/caller-owned-string-tokenization
erix:feature/heap-owned-string-duplication
erix:feature/mutable-process-environment
erix:feature/native-process-startup-exit
erix:feature/shared-process-heap
erix:feature/ordinary-startup-owner-cohort
erix:feature/owned-c-runtime-ci-graph
erix:feature/ci-source-acquisition
No reviewers
Labels
Clear labels
alpha-1
EriX Alpha 1 release acceptance
bug
Something is not working
ci
docs
duplicate
This issue or pull request already exists
enhancement
New feature
help wanted
Need some help
invalid
Something is wrong
performance
Measured performance profiling, bottleneck analysis, and regression budgets.
phase-6
Phase 6: POSIX compatibility, full EriX self-hosting, and its required audits and validation.
question
More information is needed
refactor
Code cleanup, removal of obsolete paths, and structural improvements preserving behavior.
security
wontfix
This won't be fixed
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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/lib-cstd!3
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/posix-compat"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary and rationale
Provide explicitly linked C byte/string operations, initialized-thread accessors,
a fixed C-locale error catalog, four LP64 integer conversions, ASCII character
calls, and
qsort/bsearch. Partial C headers and Rust declarations describe thesame companion products.
Tracking and scope
Libc design,
authority audit,
Integration review,
manual review,
phase completion.
Complete libc startup, allocation, POSIX adapters, sysroot selection and imported
toolchain workloads remain open.
Architecture, authority and failure behavior
Each component has an explicit source cohort and export policy. Callers own
storage, code and lifetimes; returned pointers add no authority. Thread accessors
require an initialized EriX thread image. Only conversion errors write its errno;
the catalog and ASCII character calls acquire no locale or thread state.
Allocation-free heapsort and binary search call only the supplied comparator.
Their contract
covers padding, bytewise relocation, pinning and callback stack use. Conventional
and prefixed C names share instruction bodies; the prefixed forms additionally
define zero-count/width behavior. No pointers are retained.
Validation evidence
Independent C/Rust/C++ array, ABI, guard-page and link controls accompany the
strict crate and companion checks. Full libc and guest workload acceptance are
tracked separately below.
Review checklist
erikinkinen referenced this pull request from erix/integration2026-09-12 23:47:08 +02:00
erikinkinen referenced this pull request from erix/docs2026-09-13 00:15:30 +02:00
WIP: Provide an explicit freestanding C memory runtimeto WIP: Provide explicit freestanding C memory and query routinesWIP: Provide explicit freestanding C memory and query routinesto WIP: Implement freestanding C memory and string primitiveserikinkinen referenced this pull request from erix/integration2026-09-28 21:51:13 +02:00
WIP: Implement freestanding C memory and string primitivesto WIP: Implement explicit C memory, string and initialized-thread primitivesThe C runtime producer now selects the reviewed owner that checks native self-descriptor comparisons before spawning, with exact witnesses for its two original source files. Runtime assembly and the independent instruction witness are unchanged. Deployed-host compatibility remains tracked in Integration #113.
The signed substring implementation adds
strstrto the nineteen byte/string operations. It preserves the first match using constant local storage and leaves input permissions, lifetime and errno unchanged. The manual/API and Integration selection now match the complete body/alias cohort. Full libc, actual compatibility workloads and guest builds remain open. Native CI admission remains tracked in Integration #113.The error catalog implementation is signed and pushed. It provides fixed C-locale descriptions and canonical names for all 39 assigned EriX errors, plus complete copies into caller-owned buffers. Unknown signed values and short buffers write nothing; these calls neither consult locale nor change errno. The error companion is separate, and compatibility packaging includes its original immutable data.
Integration and manual/API adoption are underway. Conventional error interfaces, further errno assignments, native mappings and mediated diagnostics remain open. The current CI run still stops at the runner prerequisite before assembly; it does not establish component acceptance.
The error catalog and its Integration and manual support are published. Message/name lookups retain no caller pointers; copies write only when the entire result fits. The current interface keeps its prefixed names while the remaining libc contracts are implemented.
The fixed catalog now includes ERANGE=40 and its original message, name and complete caller-buffer copy. Earlier entries retain their bytes and unknown inputs still return without access. Integration and manual adoption are continuing; existing packet vocabularies and native mappings remain separate.
b15c0452 adds four explicit fixed C-locale integer conversions over one shared signed/unsigned parser. Base and prefix handling, full-width bounds, overflow endpoints and error-only original thread errno are implemented. The companion selects conversion and thread sources explicitly; compatibility keeps its existing receipt fields. The related GNU archive defect is closed. Integration consumers and generated manual/API references are being updated. Conventional aliases, locale ownership, floating conversion and stdio remain open.
WIP: Implement explicit C memory, string and initialized-thread primitivesto WIP: Add explicit C runtime componentsMatching manual and API pages now describe all four integer conversions and their pointer/thread contracts. Integration selects the same Cstd source cohort. The two matching documentation checklist items are complete; full libc and guest workloads remain open.
Added fourteen fixed C-locale character functions in
2f983563: twelve ASCII predicates and two case conversions. The scalar Rust calls are safe and define the full signed-int domain, without locale or thread state.The character companion is linked separately. Manual/API adoption is next; conventional ctype interfaces and toolchain sysroot adoption remain open.
Added
qsortandbsearchin 7e42dbc7. Iterative heapsort and binary search operate on caller-owned storage through an explicit comparator. Conventional and prefixed entry points share the same instruction bodies; the contracts cover padding, relocation, lifetimes and callback stack use. The manual/API update follows in Docs PR4.Started CI 68 through the supported workflow dispatch API at the unchanged
0c096342c95147d391cb16a02f326e612408cbe2source. It runs the memory, thread and Markdown jobs. The original run and its missing-log evidence remain intact; the original executable failure cause is still unknown.Tracks the setup and log failure.
CI 68 passes memory, thread and Markdown validation on the unchanged source, with complete warning-free logs. The CI recovery issue is closed; the original missing logs and unknown failure cause remain recorded.
The source now includes ordinary C startup over the shared heap. String duplication is the next addition, with native consumer work underway.
Added the process environment APIs on the shared heap: copied
setenvvalues, borrowedputenvstrings,unsetenv,clearenvand current-tablegetenv. Replacement tables and interior aliases have explicit ownership and lifetime rules. See the environment API issue for the contract and remaining acceptance.Published the namespaced descriptor I/O bridge and partial C/C++ headers. Concurrent calls retain their own original realm call storage; the provider remains an explicit process-root object. The source graph and technical manual describe the same contract.
Conventional aliases, libc signal delivery, compatibility startup and guest acceptance remain open.
Added the mediated file interfaces: opening, duplication, positioned/vector I/O, metadata, namespace operations and filesystem controls. Counted paths and typed results use the existing root binding; the runtime adds no allocator or provider lookup.
Added counted erix_c_futimens and erix_c_utimensat interfaces through the existing process-root IO binding. Intake reads each fraction first and never loads ignored seconds for Now/Omit. The file header now exposes 37 fixed interfaces.
Tracked in file timestamp updates.
Added namespaced directory read, tell, seek and rewind in this change. The interfaces preserve complete raw names, EOF and shared-description cookies through the retained realm. The directory issue tracks the remaining native workload and API-reference work.
Added the namespaced poll/select interfaces in this checkpoint: counted LP64 sets, per-call snapshots and output publication after correlated completion and positive retirement. The design keeps conventional aliases and C signal-handler delivery separate.
Added
erix_c_pipeanderix_c_pipe2to the same process-root I/O provider. The two calls share the original realm binding and heap, preserve the separate flag domains and publish neither descriptor on an ordinary error. Posixd companion.The six regenerated API references now include the C file, pipe and readiness interfaces. Generation and an independent second conversion completed while the original producers retained their sources and JSON outputs.
The native command owner also retains failed status publication on its original invocation and handles cancellation after completed retirement. The C runtime and documentation builds now select these fixes through the coordinated consumers. Guest C execution and the complete build inside EriX remain outstanding.
Added the caller-owned multibyte conversion core, header and process-root runtime. The 22 calls share explicit ASCII/UTF-8 state without locale discovery or new grants. The native consumer and manual are published; integrated native/VM execution and the new runtime API reference remain open.
The eight namespaced clock/sleep calls now connect to Posixd through compatibility ABI 1.28. The original C probe is packaged in a separate Clock-enabled workload; existing heap profiles keep their grants. Calendar, CPU clocks and conventional aliases remain open.
Added namespaced terminal identification and window controls to the existing IO binding. Native dimensions are checked before C output is written, and the original C probe includes rights, restoration and alias-lifetime checks. Full termios and conventional aliases remain open.
Added the termios parameter API: a 36-byte record, declared constants and four local speed calls. They preserve all unrelated bytes and errno without requiring a thread image or terminal binding. Storage success does not promise device support.
The manual now includes source-bound native-target references for the C core and its I/O, multibyte and time runtimes. The filesystem consumer also exercises distinct directory bases and multi-packet cwd reports. API references; C workload.
This source is now split into feature PRs, starting at #22 and ending at #73. Each PR links its prerequisite. The complete stack preserves the runtime changes and dependency declarations; obsolete pin checkpoints and documented source-acquisition differences are separated from feature behavior.
Closing this aggregate without merging. The replacement PRs remain WIP for their remaining integration and review.
Pull request closed