SDK + P1SCode v0 Release Notes

Scope

This release documents the first integrated SDK + P1SCode tooling baseline.

Highlights

  • Added explicit SDK contract and language scope references:

    • reference/sdk-contract

    • reference/p1scode-status-and-scope

    • reference/developer-platform-index

  • Hardened SDK reliability paths:

    • allocator safety checks in SDK/lib/cstd/src/stdlib.rs

    • window lifecycle guardrails in SDK/lib/p1window/src/window.rs

    • template smoke check and known-good checklist in SDK/template/p1start-app

  • Unified early P1SCode tooling path:

    • removed hardcoded machine paths from SDK/p1sdk/p1sc.py

    • added profile and conformance fixtures under SDK/p1sdk/

    • aligned parser demo source to transpiler-compatible syntax in apps/p1sc

  • Added packaging workflow outputs:

    • build manifest and package artifacts from p1sc.py package

    • practical runtime helpers in apps/p1s_pkg and apps/p1s_linker

    • first-party SDK/template/p1scode-app template

  • Continued post-v0 tooling hardening:

    • added p1sc.py check for no-build validation

    • added project-local import resolution for import "module_path" in p1sc.py

    • added --json-diagnostics output mode for machine-readable tooling integration

    • added stdin-buffer validation support in p1sc.py (--stdin-source, --stdin-path, --stdin-import-root)

    • added p1sc_diag_bridge.py for editor-friendly diagnostic projection, including LSP-formatted output, grouped uri -> diagnostics[], and publish-ready {uri, diagnostics} payload mode

    • added stdin-buffer forwarding support in p1sc_diag_bridge.py for unsaved editor buffers, including stdin import-root forwarding

    • expanded fixture coverage for module/import flow and diagnostic error cases (including malformed import, CLI/root validation, and JSON diagnostics paths)

  • Dynamic-linking phase-1 experimental bring-up:

    • added reference/dynamic-linking contract page with explicit support/non-support boundaries

    • upgraded ld.elf to parse/report PT_DYNAMIC and DT_NEEDED metadata deterministically

    • switched from unconditional DT_NEEDED rejection to conditional eager-binding execution path

    • tightened phase targets (PIE-only stance, explicit relocation subset, deterministic search-path direction)

    • introduced stable loader error-code contract (DL_E_*) for deterministic loader failure reporting

    • added deterministic dependency probe order in loader bring-up (RUNPATH -> RPATH -> /lib) with explicit unsupported/denied diagnostics

    • added dependency mapping and eager relocation handling for the phase-1 x86_64 subset (R_X86_64_RELATIVE, GLOB_DAT, JUMP_SLOT, plus extended relocs: R_X86_64_64, PC-relative types, GOTPCREL*, R_X86_64_32/32S; see reference/dynamic-linking) with hard-fail on unresolved/unsupported cases

    • tightened symbol resolution policy (strong-over-weak precedence, duplicate strong-symbol failure, visibility/local filtering)

    • added explicit loader gating for unsupported symbol-version metadata (DT_VER* -> DL_E_VERSION_UNSUPPORTED)

    • added host-side loader fixture harness for precedence/duplicate/visibility rules

    • introduced SDK/lib/p1dl stub API surface and re-export via p1std::dl

    • tightened p1dl API behavior to validate C-string arguments/handles (InvalidArgument / InvalidHandle) before deterministic unsupported fallback

    • added phase-1 loader bridge ABI wiring: ld.elf publishes a dispatch pointer into main-executable p1dl bridge slot and serves dlopen/dlsym/dlclose requests for already-loaded handles plus deterministic runtime mapping from loader policy paths

    • added dependency init-hook execution support for DT_INIT / DT_INIT_ARRAY after mapping+relocation

    • added runtime-handle teardown hook execution on close-to-zero (DT_FINI_ARRAY reverse order, then DT_FINI) while keeping startup-pinned DT_NEEDED handles non-finalizing

    • added SDK/loader-fixtures/hello-so minimal smoke fixture scaffold (hello.so + main.elf) plus CI verification script (scripts/verify_loader_smoke_fixture.py)

    • added SDK/loader-fixtures/p1dl-runtime-smoke app fixture that calls p1std::dl::dlopen + dlsym + dlclose against hello.so and documents expected pass/fail runtime output under ld.elf

    • expanded runtime smoke fixture to validate lifecycle transitions across reopen (constructor/destructor bias checks) under bridge-managed close/reopen

    • added repeatable QEMU boot harness scripts/run_p1dl_runtime_boot_smoke.py to build/stage smoke artifacts and assert [LD.SO] bridge install + [p1dl-smoke] PASS from serial logs

    • validated runtime smoke end-to-end in QEMU (hello.so runtime dlopen probe/load + bridge install + [p1dl-smoke] PASS) after eliminating alignment-sensitive loader parsing paths and making bridge install independent of startup DT_NEEDED presence

Documentation follow-ups (May 2026)

  • JSON diagnostics: canonical schema, stable error codes, and bridge behavior are documented in reference/p1scode-toolchain-workflow (§ JSON diagnostics).

  • Conformance: SDK/p1sdk/run_fixtures.py runs Python transpiler fixtures, bridge checks, and host p1sc_syntax parser tests against the same .p1s files under SDK/p1sdk/fixtures/.

  • Template: SDK/template/p1scode-app supports -Check, -Build, -JsonDiagnostics (with -Check), and default package.

Known Limitations

  • P1SCode parser and transpiler are still separate implementations with partial overlap.

  • Dynamic linking remains unsupported as production contract.

  • Tooling ergonomics (full parser-grade diagnostics, package management semantics) are still early-stage.

Next-Quarter Priorities

  • Move parser/transpiler toward one grammar/AST contract.

  • Expand conformance fixtures to include richer error diagnostic cases.

  • Tighten SDK regression automation across app templates and high-usage crates.

  • Continue migrating legacy narrative docs into canonical Sphinx/reference pages.