Skip to content

feat(sdk)!: unify explicit extension and resource configuration - #211

Open
f0rr0 wants to merge 17 commits into
mainfrom
f0rr0/explicit-sdk-resources
Open

feat(sdk)!: unify explicit extension and resource configuration#211
f0rr0 wants to merge 17 commits into
mainfrom
f0rr0/explicit-sdk-resources

Conversation

@f0rr0

@f0rr0 f0rr0 commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Summary

SDKs previously differed in extension selection, resource ownership, and application setup. Unify native Rust, Node/Bun/Deno, Kotlin/Java, Swift, React Native, and WASIX Rust/TypeScript around explicit per-database descriptors for contrib and external extensions. Package installation selects the extension version and supplies its resources; SQL migrations retain CREATE EXTENSION.

  • Keep contrib and standard initialization seeds in the base distribution. Make external extensions, ICU with its matching seed, and frontend tools optional packages, and remove their payloads from the base WASIX N-API addon.
  • Move ordinary native Rust artifact setup into the SDK. Remove consumer build scripts, build dependencies, runtime metadata, and WASIX per-extension feature gates. Infer mobile shipping resources from installed dependencies while keeping database selection explicit.
  • Provide Java's blocking facade, consistent platform storage helpers for open and restore, and independent SwiftPM resource packages. Preserve platform conventions and existing query, transaction, streaming, backup, tool, and server capabilities.
  • Add native TypeScript /direct and /broker imports and WASIX /browser. Narrow storage and mode options at compile time and reject incompatible JavaScript configuration early. Default imports remain available; one installation supplies the execution modes. A universal WASIX installation still includes browser bytes, while native entrypoints avoid the browser engine and storage providers.
  • Remove redundant TS restore copies and native tool argument reconstruction. Snapshot Buffer views correctly. Preserve optional resource locations across worker boundaries, resolve package metadata asynchronously, and reuse verified immutable resource bytes.
  • Use runtime versions for package compatibility. Remove shipped source-fingerprint fields, loader gates, producer helpers, and their obsolete tests; retain payload integrity and target/engine validation, plus producer-only build-cache invalidation.
  • Move WASIX N-API actor/server resource preparation onto their Rust owners and tool registration onto Node background work. Bump the internal addon ABI to 2 and update all consumers. Document that native Node direct topology remains asynchronous while WASIX /direct executes on the importing thread.
  • Publish native ICU as oliphaunt-icu and WASIX ICU as oliphaunt-wasix-icu, each owned and versioned by its runtime, without cross-runtime payloads or release prerequisites.
  • Update release packagers, consumer tests, examples, documentation, policy, and CI. Fix Swift contrib native-dependency delivery and mobile source installs resolving desktop packages from npm. Installed WASIX smokes use the release resource packagers and same-run tool AOT inputs. Package tasks compile consumers against the staged exports and declarations.
  • Include bootstrap correctness fixes from fix: preserve runtime discovery and seed layout across SDKs #210: downstream-safe resource registration, lossless empty-directory transport, strict PGDATA layout, private directory permissions, and seed-free initialization where supported. Remove obsolete setup paths, duplicate selection lists, and unused publisher/test code.

The optional-standard-seed rollout is deferred. Standard seeds remain bundled.

Release Intent

  • Package/API/runtime change: breaking feat(sdk)!: title.
  • Docs/CI/repository-only change: no release intended.
  • Source/input/runtime asset change: generated metadata and release affectedness are current; source pins are unchanged.

Consumers must migrate to explicit resource descriptors and install the optional packages they use. Standalone SwiftPM repositories and their release-app permissions must be provisioned before first publication.

Verification

  • SDK compile/check, unit, package, and shared contract qualification across the PR. The latest update replays native/WASIX TypeScript, tools, Swift, browser example compilation, formatting/lint, release metadata, and graph checks.

  • Staged-package TypeScript consumers verify /browser, default native, /direct, /worker, /server, and native /broker resolution. Invalid storage and mode configurations must produce TypeScript errors, including options passed through variables.

  • Real packed browser execution passes direct and worker queries, IndexedDB reopen, transactions, bundled pg_trgm, independently packaged pgTAP, pg_dump, and psql restore. Local execution uses the unchanged portable runtime from CI run 34349434532 with the current SDK and resource packagers; this is local regression evidence, not exact-commit release qualification.

  • Source-browser execution also passes OPFS persistence/crash recovery, large PostGIS worker modules, and bundled earthdistance with its cube dependency. The development resource adapter now exports the bundled contrib descriptors.

  • Native TypeScript and WASIX TypeScript line coverage remain above the unchanged 80% gates. Runtime tests cover early storage rejection, worker resource preservation, native tool registration, and restore byte-view ownership.

  • Swift carrier tests verify copied native dependencies, target linkage, registration, archive/cache validation, and consumers. Mobile resource packages install offline without desktop carriers while preserving the minimum release-age policy.

  • The corrected AOT Cargo command compiles and discovers all four intended UUID-OSSP AOT tests. Executing those tests requires produced target AOT assets and remains part of hosted qualification.

  • Full release implementation, policy units, release graph/metadata, SDK contracts, formatting/lint, WASIX TS (344 tests), WASIX Rust (199 shared tests plus public API/doctest checks), N-API compile/unit, and source-input qualification pass locally. Packed ICU consumers prove independent native/WASIX versions; the benchmark plan and ABI checks pass. Earlier local qualification includes pinned actionlint/zizmor.

  • An actual Node addon probe verifies Promise rejection for async actor/server configuration failures, synchronous direct rejection, asynchronous tool preparation, and an event-loop timer continuing while Rust resource I/O blocks.

  • Hosted run 34382614858 built the fresh portable runtime and all four AOT targets and passed WASIX release regression. The corrected Linux Node integration suite passes locally with those runtime/AOT artifacts, including direct/actor backup and restore, server lifecycle, and async configuration failures. Windows backup serialization uses portable path components; the existing hosted smoke exercises that path.

  • The latest correction also passes full workspace Rust lint, all 199 WASIX shared tests, public API checks, N-API unit tests, formatting, pinned actionlint/zizmor, workflow behavior tests, and apt-bootstrap regressions. Runner setup disables unrelated Microsoft/Chrome apt feeds before package installation, retaining Ubuntu sources.

  • Existing PR checks also cover Rust consumers, Kotlin/Java AAR and R8 delivery, React Native package/codegen, and installed resource discovery.

  • Follow-up 323c0d04 fixes tool AOT manifest serialization, narrows addon provenance validation to bundled contrib, selects only relevant Swift release carriers, and writes Android staging resource receipts from verified artifact versions. The full release implementation suite, Swift unit/consumer checks (97 Swift tests), React Native compile/package/platform checks, and mobile runner regressions pass locally. All four addon release archives from run 34456264126 pass the corrected validator; a real Linux addon loads repackaged optional tools and executes psql and pg_dump. These reused artifacts are diagnostic evidence, not qualification for the new commit.

  • Follow-up 5bb54ce7 corrects the standalone Swift carrier lookup to entry.extension.sqlName. The consumer regression now uses a base carrier with no external extensions; it fails against the prior implementation and passes with the correction. Full Swift unit/package qualification and eight iOS carrier/planner tests pass locally. Run 34497064682 passed Android installed-app E2E, WASIX TypeScript, and all N-API release-asset checks; its remaining causal failure was this Swift consumer lookup. Hosted Apple execution remains required for the corrected commit.

Completion requires this commit's hosted Qualified gate, including target-platform and device execution. Linux fixture checks do not substitute for Apple/Android execution. No packages or SwiftPM repositories have been published.

@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
oliphaunt-docs Ready Ready Preview Sep 11, 2026 7:08am UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant