Complete remaining memory and string interfaces #93

Open
erikinkinen wants to merge 56 commits from feature/remaining-memory-string-family into feature/standard-multibyte-headers
Owner

Provide nineteen original wide memory/string functions plus eight rooted collation functions, strerror, POSIX-int strerror_r and per-thread strtok. The pure wide companion retains exact signed32/size64 storage and alias policies. Rooted operations use the existing sole process publication, actual locale objects and private thread registrations; no new native storage format or global thread table is introduced.

Depends on #91 and implements the family designed in #92. Integration producer support is tracked by erix/integration#613. Binary C/POSIX and UTF-8 collation does not claim Unicode collation. Unsupported wide I/O, formatting, numeric and classification interfaces remain separate.

  • Implement the complete thirty-function family and exact C/C++ signatures.
  • Preserve original thread cursor custody through reentry, exit and reclamation.
  • Reuse the original immutable error catalog with failure-atomic POSIX-int copies.
  • Execute original wide instructions under semantic, guard-page and ABI controls.
  • Document storage permissions, locale lifetime and the 64-byte substring stack requirement.

Validation: 237 workspace Rust library tests; strict all-feature host and bare-target Clippy; formatting; thirteen header contract tests; all 45 Markdown files. The maintained wide checker validates all three export policies, both public/hidden semantic and ABI executables, six actual SIGSEGV controls and core missing-alias refusal. Independent C semantics cover 500 rounds and substring adversaries. These source and host controls do not claim native guest, complete sysroot or toolchain acceptance.

Provide nineteen original wide memory/string functions plus eight rooted collation functions, strerror, POSIX-int strerror_r and per-thread strtok. The pure wide companion retains exact signed32/size64 storage and alias policies. Rooted operations use the existing sole process publication, actual locale objects and private thread registrations; no new native storage format or global thread table is introduced. Depends on #91 and implements the family designed in #92. Integration producer support is tracked by erix/integration#613. Binary C/POSIX and UTF-8 collation does not claim Unicode collation. Unsupported wide I/O, formatting, numeric and classification interfaces remain separate. - [x] Implement the complete thirty-function family and exact C/C++ signatures. - [x] Preserve original thread cursor custody through reentry, exit and reclamation. - [x] Reuse the original immutable error catalog with failure-atomic POSIX-int copies. - [x] Execute original wide instructions under semantic, guard-page and ABI controls. - [x] Document storage permissions, locale lifetime and the 64-byte substring stack requirement. Validation: 237 workspace Rust library tests; strict all-feature host and bare-target Clippy; formatting; thirteen header contract tests; all 45 Markdown files. The maintained wide checker validates all three export policies, both public/hidden semantic and ABI executables, six actual SIGSEGV controls and core missing-alias refusal. Independent C semantics cover 500 rounds and substring adversaries. These source and host controls do not claim native guest, complete sysroot or toolchain acceptance.
erikinkinen added this to the Alpha 1 milestone 2026-11-08 18:10:08 +01:00
Keep read-only input and writable output ranges between actual guard pages. Check full-width counts, signed units, overlap, padding, token cursors and repetitive substring searches at the assembly calling boundary. Independent register, stack and page-fault controls ensure the harness rejects broken boundaries.
Add the complete pure wide companion and rooted collation, error and tokenizer interfaces over the original process and thread registrations. Preserve the native storage wire layout, explicit source companions and caller memory contracts while separating instruction-only operations from locale-bound behavior.
Retain the separately authored page, ABI, high-count and adversarial controls alongside the actual wide instruction family. These fixtures exercise the real companion without a host libc reference or a fabricated runtime owner.
Exercise the original wide instructions with independent semantic, protected-range and ABI probes and retain tokenizer ownership through reentry and exit. Check complete conventional header types and original catalog failure atomicity, using typed EriX error assignments rather than host numeric assumptions.
fix: Use original typed range status and enroll family signatures
Some checks failed
CI / memory (pull_request) Has been skipped
CI / thread (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 9s
CI / memory (push) Failing after 2m22s
CI / thread (push) Successful in 2m32s
21d6425eb8
Keep POSIX error returns tied to the original EriX assignments and retain the independent expected count for the three additional C and C++ family signature witnesses. Preserve the existing conversion and unsupported-interface negative controls.
docs: Distinguish implemented strings from remaining wide library gaps
Some checks failed
CI / memory (pull_request) Has been skipped
CI / thread (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 12s
CI / memory (push) Failing after 2m40s
CI / thread (push) Successful in 2m38s
7b17463203
Point the historical upstream conversion mapping at the newly implemented memory and string family while preserving the separate wide-stream, formatting and complete sysroot acceptance requirements.
fix: Admit the genuine seven-member C runtime workspace
Some checks failed
CI / memory (pull_request) Has been skipped
CI / thread (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 13s
CI / memory (push) Failing after 2m40s
CI / thread (push) Successful in 2m24s
16a4a3205e
Retain the original thread runtime as an explicit seventh local package before the maintained Cargo matrix. Validate actual captured Cargo metadata and preserve missing, extra and foreign-path refusals; update exact feature and helper-cohort controls for the already selected source variants without accepting arbitrary dependencies or weakening source ownership.
Prepare the existing original Cargo source operation before full-crate direct Rust witnesses and retain its actual thread-runtime ABI library through their consumers. Keep the same complete Cargo matrix and explicit source selections; the standalone conversion checker acquires its own bounded operation from that snapshot.

(cherry picked from commit 4f5fef77d0)
(cherry picked from commit 5c295b843e)
Bind code and nonlinkable metadata files to the actual Cargo artifact and original producer before capture. Check and independently retire all original outputs without deriving companion paths or calling replaced receivers.

(cherry picked from commit 34e14f1037)
(cherry picked from commit 228f79b70f)
Register the original capture attempt before opening a reported Cargo output. An unreturned acquisition cannot be retired as an empty receiver or reopened by a later attempt.

(cherry picked from commit c0b3c9d88a)
(cherry picked from commit 82e55d7676)
Bind every output receiver to the original completed artifact selection and journal position before its initializer or file effects. Refuse path-only construction, repeated initialization and changed original registrations while retaining original close duties.

(cherry picked from commit 84121510d0)
(cherry picked from commit 72486ee343)
Reject a replaced library selector before a consumer command or callback, even when the original output roster remains intact. Cleanup observes only the original journal before draining its original receivers.

(cherry picked from commit 984fe39d53)
(cherry picked from commit 54fe1bf15c)
Provide each originally reported code and metadata file as an explicit extern path. Compilers whose archives contain metadata stubs then receive the actual full metadata from the same retained production, without inferred files or changed embedding options.

(cherry picked from commit 515ea2cfbe)
(cherry picked from commit ae871e36a5)
Check original self registration before latching an observation failure or draining produced files. Copied dependency and output views cannot poison or close their actual original producer.

(cherry picked from commit 2c0c1de7e1)
(cherry picked from commit ea4e013bbc)
Route thematic full-crate callers through the same original dependency owner as their library. Keep the actual extern metadata, dependency directory and fresh output checks throughout each compiler call so transitive crate loading does not fall back to an unowned lookup.

(cherry picked from commit 3420f7bf9b)
(cherry picked from commit 8360b79491)
Match the intrinsic expected length directly when selecting the short-copy capacity. The debug callback must preserve its unchanged known and unknown error assertions without acquiring an out-of-line core slice-method dependency.

(cherry picked from commit fc2f4828da)
(cherry picked from commit 676f56d1a1)
(cherry picked from commit df35b4d4f3)
Keep the saved compiler command subordinate to the original retained output lifetime. Document the shared dependency boundary and check that a withdrawn receiver refuses before source verification or native invocation.

(cherry picked from commit 0e4a1882d1)
(cherry picked from commit 0109876060)
Keep intentional Linux SIGILL controls from publishing uncontrolled core output. Change only each declared crash child, assert its actual limit and dumpability policy, and preserve the parent signal and generated-source closure requirements.

(cherry picked from commit d46538f25f)
(cherry picked from commit 1ee3b7b1c7)
(cherry picked from commit 01e7fdabb3)
Keep the existing acquisition orderings and update closures while using the renamed standard-library API. Identifier allocation and join-state claims retain their original exhaustion and once-only behavior without deprecated method warnings.

(cherry picked from commit a233f694aa)
(cherry picked from commit 361dd5dca9)
Use the same standard-library rename for startup binding counts and locale references. Preserve the existing orderings, overflow limits and refusal closures.

(cherry picked from commit fbe840291f)
(cherry picked from commit a72fc61c59)
Keep exact dependency and feature equality for the existing thread, locale and string-state edges. The later case-insensitive string mode remains outside this feature.
test: Keep directory fixture arrays concise under strict workspace checks
Some checks failed
CI / memory (pull_request) Has been skipped
CI / thread (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / memory (push) Failing after 1m51s
CI / thread (push) Successful in 58s
CI / markdown (push) Successful in 3s
d884674373
Express the seven rejected literal byte arrays as equivalent fixed byte strings, preserving every malformed-directory case and its exact expected bytes without suppressing Clippy.

(cherry picked from commit c2a2cd5eb6)
fix: Keep checked atomic admission compatible with stable Rust
Some checks failed
CI / memory (pull_request) Has been skipped
CI / thread (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 7s
CI / thread (push) Successful in 1m16s
CI / memory (push) Failing after 4m13s
300f10e344
Use compare-exchange loops for generation, borrow, lease and locale reader admission. Preserve the original success and failure orderings, old-value result and overflow refusal without requiring the unstable atomic_try_update API.
Author
Owner

The workspace test link now uses the defining-unit archive rather than also linking the monolithic memory object, preventing duplicate C symbol definitions. C-string test inputs now use equivalent typed literals, including the thread tokenizer fixtures reached by all-feature checks. The original assertions remain intact. Published in 4469c3d8.

The workspace test link now uses the defining-unit archive rather than also linking the monolithic memory object, preventing duplicate C symbol definitions. C-string test inputs now use equivalent typed literals, including the thread tokenizer fixtures reached by all-feature checks. The original assertions remain intact. Published in `4469c3d8`.
Replace unconditional whole-object Cargo link inputs with an indexed archive of the same original namespaced assembly units. Inline-owning startup and thread tests keep their definitions while unresolved consumers extract the original required members; complete workspace targets, features and strict duplicate-definition checks remain intact.

(cherry picked from commit f679d18e0f)
Strict all-feature workspace checks reach three manually terminated input strings. Express the same bytes and pointer types with C-string literals so those original startup controls remain enabled under the maintained warning policy.
Represent the existing empty and colon delimiter bytes with C-string literals. This preserves every tokenizer assertion and pointer type while allowing strict all-feature workspace checks to reach the complete thread runtime controls.
style: Match startup string tests to the CI formatter
Some checks failed
CI / memory (pull_request) Has been skipped
CI / thread (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / thread (push) Successful in 1m5s
CI / markdown (push) Successful in 3s
CI / memory (push) Failing after 8m41s
4469c3d874
Preserve the existing C-string inputs and assertions while using the wrapping selected by the maintained Rust 1.93 formatter.
fix: Match the selected wide alias rejection diagnostic
All checks were successful
CI / memory (pull_request) Has been skipped
CI / thread (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 3s
CI / thread (push) Successful in 1m12s
CI / memory (push) Successful in 11m11s
f486521daf
Use the selected BFD linker diagnostic for the core-only negative link and require the missing symbols to match the complete conventional wide API.
Retain the original seven-member source and strict Cargo metadata checks before adding the locale byte comparison feature. Preserve published family history and keep the independent CI repair separate from the new ABI.
feat: Compare required byte strings through the original locale root
Some checks failed
CI / memory (pull_request) Has been skipped
CI / thread (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 16s
CI / memory (push) Failing after 2m28s
CI / thread (push) Successful in 2m33s
be0c8d4236
Provide the selected CMake and Git case-comparison pair using actual current LC_CTYPE and the existing character companion. Preserve unsigned-byte, full-width count and readonly storage contracts without new thread state or implicit locale ownership; validate real compiled Rust guards, native export visibility, original root selection and freestanding header signatures.
fix: Keep case comparison independent of memory string activation
Some checks failed
CI / memory (pull_request) Has been skipped
CI / thread (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 20s
CI / memory (push) Failing after 2m6s
CI / thread (push) Successful in 2m22s
2d5d5a8c13
Share the descriptive error type without loading optional collation or tokenizer code. Exercise actual default workspace tests and the case-only host and bare-target configurations so all-feature validation cannot conceal a missing feature dependency; preserve the original memory-string error reexport and reject accidental memory exports.
Prepare the existing original Cargo source operation before full-crate direct Rust witnesses and retain its actual thread-runtime ABI library through their consumers. Keep the same complete Cargo matrix and explicit source selections; the standalone conversion checker acquires its own bounded operation from that snapshot.

(cherry picked from commit 4f5fef77d0)
Bind code and nonlinkable metadata files to the actual Cargo artifact and original producer before capture. Check and independently retire all original outputs without deriving companion paths or calling replaced receivers.

(cherry picked from commit 34e14f1037)
(cherry picked from commit 228f79b70f)
Register the original capture attempt before opening a reported Cargo output. An unreturned acquisition cannot be retired as an empty receiver or reopened by a later attempt.

(cherry picked from commit c0b3c9d88a)
(cherry picked from commit 82e55d7676)
Bind every output receiver to the original completed artifact selection and journal position before its initializer or file effects. Refuse path-only construction, repeated initialization and changed original registrations while retaining original close duties.

(cherry picked from commit 84121510d0)
(cherry picked from commit 72486ee343)
Reject a replaced library selector before a consumer command or callback, even when the original output roster remains intact. Cleanup observes only the original journal before draining its original receivers.

(cherry picked from commit 984fe39d53)
(cherry picked from commit 54fe1bf15c)
Provide each originally reported code and metadata file as an explicit extern path. Compilers whose archives contain metadata stubs then receive the actual full metadata from the same retained production, without inferred files or changed embedding options.

(cherry picked from commit 515ea2cfbe)
(cherry picked from commit ae871e36a5)
Check original self registration before latching an observation failure or draining produced files. Copied dependency and output views cannot poison or close their actual original producer.

(cherry picked from commit 2c0c1de7e1)
(cherry picked from commit ea4e013bbc)
Route thematic full-crate callers through the same original dependency owner as their library. Keep the actual extern metadata, dependency directory and fresh output checks throughout each compiler call so transitive crate loading does not fall back to an unowned lookup.

(cherry picked from commit 3420f7bf9b)
(cherry picked from commit 8360b79491)
Match the intrinsic expected length directly when selecting the short-copy capacity. The debug callback must preserve its unchanged known and unknown error assertions without acquiring an out-of-line core slice-method dependency.

(cherry picked from commit fc2f4828da)
(cherry picked from commit 676f56d1a1)
(cherry picked from commit df35b4d4f3)
Keep the saved compiler command subordinate to the original retained output lifetime. Document the shared dependency boundary and check that a withdrawn receiver refuses before source verification or native invocation.

(cherry picked from commit 0e4a1882d1)
(cherry picked from commit 0109876060)
Keep intentional Linux SIGILL controls from publishing uncontrolled core output. Change only each declared crash child, assert its actual limit and dumpability policy, and preserve the parent signal and generated-source closure requirements.

(cherry picked from commit d46538f25f)
(cherry picked from commit 1ee3b7b1c7)
(cherry picked from commit 01e7fdabb3)
Keep the existing acquisition orderings and update closures while using the renamed standard-library API. Identifier allocation and join-state claims retain their original exhaustion and once-only behavior without deprecated method warnings.

(cherry picked from commit a233f694aa)
(cherry picked from commit 361dd5dca9)
Use the same standard-library rename for startup binding counts and locale references. Preserve the existing orderings, overflow limits and refusal closures.

(cherry picked from commit fbe840291f)
(cherry picked from commit a72fc61c59)
Account for the existing inert thread-runtime dependency and locale/string feature edges in the startup source contract. Retain exact dependency and feature equality, optional POSIX admission and forbidden core export checks without changing production code.

(cherry picked from commit 10ad88da04)
Express the seven rejected literal byte arrays as equivalent fixed byte strings, preserving every malformed-directory case and its exact expected bytes without suppressing Clippy.

(cherry picked from commit c2a2cd5eb6)
Replace unconditional whole-object Cargo link inputs with an indexed archive of the same original namespaced assembly units. Inline-owning startup and thread tests keep their definitions while unresolved consumers extract the original required members; complete workspace targets, features and strict duplicate-definition checks remain intact.

(cherry picked from commit f679d18e0f)
test: Express startup C-string fixtures without manual terminators
Some checks failed
CI / memory (pull_request) Has been skipped
CI / thread (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 3s
CI / thread (push) Successful in 1m17s
CI / memory (push) Failing after 3m12s
7ffb51b536
Use equivalent static C-string literals at the four rejected comparison callsites so strict Clippy checks retain the original bytes and pointer types without lint waivers.

(cherry picked from commit 64f62d6a56)
style: Format literal string comparison controls
Some checks failed
CI / memory (pull_request) Has been skipped
CI / thread (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 4s
CI / thread (push) Successful in 1m15s
CI / memory (push) Failing after 3m30s
76cd09d7dc
Keep the native C string literal assertions in the repository's Rust formatting style.
fix: Keep checked atomic admission compatible with stable Rust
Some checks failed
CI / memory (pull_request) Has been skipped
CI / thread (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / thread (push) Successful in 1m22s
CI / markdown (push) Successful in 7s
CI / memory (push) Failing after 4m47s
1a8ee26a1e
Use compare-exchange loops for generation, borrow, lease and locale reader admission. Preserve the original success and failure orderings, old-value result and overflow refusal without requiring the unstable atomic_try_update API.
Strict all-feature workspace checks reach three manually terminated input strings. Express the same bytes and pointer types with C-string literals so those original startup controls remain enabled under the maintained warning policy.
Represent the existing empty and colon delimiter bytes with C-string literals. This preserves every tokenizer assertion and pointer type while allowing strict all-feature workspace checks to reach the complete thread runtime controls.
style: Match startup string tests to the CI formatter
Some checks failed
CI / memory (pull_request) Has been skipped
CI / thread (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / thread (push) Successful in 1m4s
CI / markdown (push) Successful in 3s
CI / memory (push) Failing after 9m0s
d153cc9f89
Preserve the existing C-string inputs and assertions while using the wrapping selected by the maintained Rust 1.93 formatter.
fix: Match the selected wide alias rejection diagnostic
All checks were successful
CI / memory (pull_request) Has been skipped
CI / thread (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 4s
CI / thread (push) Successful in 1m13s
CI / memory (push) Successful in 11m22s
3c8603ca59
Use the selected BFD linker diagnostic for the core-only negative link and require the missing symbols to match the complete conventional wide API.
feat: Reconcile locale byte comparisons with the memory string family
All checks were successful
CI / markdown (push) Successful in 3s
CI / thread (push) Successful in 1m8s
CI / memory (push) Successful in 12m50s
9a953780e5
Merge lib-cstd #95 into feature/remaining-memory-string-family
All checks were successful
CI / memory (pull_request) Has been skipped
CI / thread (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 3s
CI / thread (push) Successful in 1m6s
CI / memory (push) Successful in 12m38s
b7251a5704
All checks were successful
CI / memory (pull_request) Has been skipped
CI / thread (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 3s
CI / thread (push) Successful in 1m6s
CI / memory (push) Successful in 12m38s
This pull request has changes conflicting with the target branch.
  • ARCHITECTURE.md
  • README.md
  • ROADMAP.md
  • scripts/check-memory-runtime.py
  • scripts/workspace_cargo_checks.py
  • tests/startup_source_contract_test.py
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'feature/remaining-memory-string-family:feature/remaining-memory-string-family'
git switch 'feature/remaining-memory-string-family'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'feature/standard-multibyte-headers'
git merge --no-ff 'feature/remaining-memory-string-family'
git switch 'feature/remaining-memory-string-family'
git rebase 'feature/standard-multibyte-headers'
git switch 'feature/standard-multibyte-headers'
git merge --ff-only 'feature/remaining-memory-string-family'
git switch 'feature/remaining-memory-string-family'
git rebase 'feature/standard-multibyte-headers'
git switch 'feature/standard-multibyte-headers'
git merge --no-ff 'feature/remaining-memory-string-family'
git switch 'feature/standard-multibyte-headers'
git merge --squash 'feature/remaining-memory-string-family'
git switch 'feature/standard-multibyte-headers'
git merge --ff-only 'feature/remaining-memory-string-family'
git switch 'feature/standard-multibyte-headers'
git merge 'feature/remaining-memory-string-family'
git push origin 'feature/standard-multibyte-headers'
Sign in to join this conversation.
No description provided.