feat(tools): add managed native dependencies#598
Open
Guikingone wants to merge 1 commit into
Open
Conversation
Guikingone
force-pushed
the
feat/native-dependencies
branch
from
July 22, 2026 20:48
a320e3a to
a69cd5c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces Elephc's first curated native-dependency workflow through
elephc native, with PCRE2 10.47 as the initial package.Projects can now declare, lock, install, update, remove, inspect, and diagnose
native packages without conflating them with Composer packages, Rust bridge
crates, or the user-provided compiler/SDK toolchain.
The complete frozen design is recorded in
.plans/native-dependencies-v1.md.User-facing workflow
elephc.tomlholds exact project declarations while preserving unrelatedTOML comments and formatting.
elephc.lockrecords the exact catalog recipe, source checksum, outputs, andsupported targets deterministically.
by package, target, ABI, recipe, source, and toolchain fingerprint.
--lockedrefuses missing or stale lock state;--offlineguarantees thatno download is attempted.
rewrites native dependency state.
Implementation
elephc native add/install/update/remove/list/doctorCLIfamily, project discovery, manifest and lock handling, catalog resolution,
toolchain selection, verified downloads, transactional extraction/builds,
cache receipts, and diagnostics.
archives, user link inputs, frameworks, and platform defaults.
preserving the existing bridge table and target-aware behavior.
pcre2package only on final-linkpaths. There is intentionally no production fallback to a system PCRE2.
opaque handles and fixed-width capture offsets; no PCRE2-owned C layout
crosses the runtime ABI boundary.
or link PCRE2.
macos-aarch64,linux-aarch64, andlinux-x86_64in the same change.date-json-regexexample with committed manifest and lockstate, plus managed-PCRE2 CI smoke coverage.
Compatibility note
Regex-enabled final links now require project-managed PCRE2 state:
Existing Homebrew, distribution,
--link-path, or raw-lpcre2-*discovery isnot used as an implicit fallback. Front-end-only
--check,--emit-ir, and--emit-asmflows remain independent from installed native artifacts.Documentation
strings, and system/I/O documentation.
generated content is idempotent.
Validation
cargo fmt --all -- --checkCARGO_INCREMENTAL=0 cargo check --bin elephc --tests --lockedgit diff --checkeval()bridge requirement regression: 1/1and Linux x86_64, including locked offline reinstall and compiled output
Reviewer guide
The highest-value review areas are: