Skip to content

Latest commit

 

History

History
176 lines (116 loc) · 18.3 KB

File metadata and controls

176 lines (116 loc) · 18.3 KB

P0 granular record: completed vertical architecture

English | 简体中文 | Main roadmap

All rows are ✅ Complete within the original P0 vertical-slice and feasibility scope. This is a retrospective decomposition of the seventeen completed parent tasks, not a new implementation claim, a new test run, or a reopening of P0. Each parent is the aggregate of its listed children; P0-GATE is the aggregate of the three historical gate rows. Leaves have their own acyclic dependencies and do not wait for their own phase gate.

The evidence source is the existing main-roadmap record for commit 286f139, collected during 2026-09-02 through 2026-09-04 with .NET SDK 10.0.400 and runtime 10.0.11. W means Windows run 33857817622, L means Linux run 33857817620, and H means both historical CI archives and their recorded main-roadmap evidence. These references are preserved, not freshly downloaded or rerun in this documentation change.

Each platform archive records 14 files/seven JSON reports, 73/73 executable tests, 4/4 vertical differential, 6/6 syntax, 6/6 name resolution, 4/4 IO smoke, standalone ILVerify and native execution. The separately recorded local 74/74 run is a later local count, not the CI denominator. Local WSL SDK mismatch and missing sqlite3 were skipped/blocked locally; the actual native CI reports supply the successful Linux/SQLite evidence. No local skip is relabeled as success.

Named source/test files below are current inspection locations for the historical deliverable; their present contents may include later work. The eight CLR LIR and eight ownership cases, generic/trait model, and managed-hybrid probes demonstrate bounded feasibility only. They do not close P1 source-level semantics, generated destructor failure handling, later API profiles or new platforms. Concurrent publication collision hardening, filesystem-alias handling and externally locked artifact recovery remain later gates under the main roadmap's boundary.

The recorded harness command is dotnet run --project tests/RustSharp.Tests/RustSharp.Tests.csproj -c Release --no-restore; it is an executable harness, not dotnet test discovery. Existing evidence identifies tool/profile/platform, fixed counts and bounded process/cleanup information. Ignored artifacts/ paths name recorded reproducible outputs and are not newly committed reports. This documentation work does not change global.json.

P0-01: Solution and project boundaries

ID Status Deliverable / ownership Depends on Done when Evidence
P0-01.01 ✅ Complete RustSharp.slnx, src/, tests/RustSharp.Tests/ — Create the compiler/CLI/syntax/IL/test project boundaries. — Solution listing includes the agreed projects; dependencies follow the C# compiler/direct IL architecture. dotnet sln RustSharp.slnx list; historical source tree.
P0-01.02 ✅ Complete global.json, Directory.Build.props, Directory.Packages.props — Pin the .NET 10 build and central package configuration. P0-01.01 Recorded SDK 10.0.400 Release builds succeed with zero warnings/errors; the SDK pin remains unchanged. H: clean Release build logs.

P0-02: Accepted architecture decisions

ID Status Deliverable / ownership Depends on Done when Evidence
P0-02.01 ✅ Complete docs/adr/0001-language-baseline.md, docs/adr/0002-csharp-compiler-and-il-output.md, docs/adr/0003-first-vertical-slice.md — Accept language, implementation/output and vertical-slice decisions. — ADRs say Accepted and fix Rust 1.98/Edition 2024, C#/.NET 10, direct IL and the first executable scope. Three accepted ADRs; original P0-02 evidence.
P0-02.02 ✅ Complete docs/adr/0004-ownership-mir-spike.md, docs/adr/0005-generic-trait-spike.md, docs/adr/0006-managed-hybrid-runtime-spike.md — Accept bounded ownership, generics and runtime feasibility contracts. P0-02.01 All three ADRs are Accepted and distinguish feasibility models from full Rust semantics. Three accepted spike ADRs; original P0-02 evidence.

P0-03: First compatibility profile

ID Status Deliverable / ownership Depends on Done when Evidence
P0-03.01 ✅ Complete docs/compatibility.md — Name and freeze the vertical-slice language boundary. P0-02 The profile is vertical-slice-v1 on Rust 1.98.0/Edition 2024 and includes only main with literal println statements. Compatibility contract and ADR 0003.
P0-03.02 ✅ Complete docs/compatibility.md, tools/RustSharp.Conformance/fixtures/ — Make exclusions and the initial positive/negative examples explicit. P0-03.01 Unsupported source is diagnosed; Rust ABI/rlib/repr(Rust) and full language/library compatibility are not promised. Initial four-fixture catalog; P0-11 supplies differential results.

P0-04: Bounded processes and cleanup

ID Status Deliverable / ownership Depends on Done when Evidence
P0-04.01 ✅ Complete src/RustSharp.Compiler/BoundedProcessRunner.cs — Bound subprocess execution and collect process/output evidence. P0-01 Normal exit, timeout, cancellation and output limits are distinguishable; PID/start/parent/command/elapsed and both streams are recorded. tests/RustSharp.Tests/BoundedProcessTests.cs; H.
P0-04.02 ✅ Complete src/RustSharp.Compiler/BoundedProcessRunner.cs, eng/Invoke-BoundedProcess.ps1 — Drain output concurrently and reclaim owned child trees. P0-04.01 Recorded exit/timeout/cancel cases cannot deadlock on output and report owned-child cleanup; root smoke helper remains a narrower tool. Bounded process timeout/cancel/child cases in H.

P0-05: Narrow parser and diagnostics

ID Status Deliverable / ownership Depends on Done when Evidence
P0-05.01 ✅ Complete src/RustSharp.Syntax/, tests/RustSharp.Tests/SyntaxTests.cs — Parse main, literal println, comments and escapes. P0-03 Valid first-slice input and nested-comment/string cases produce the expected syntax. Syntax parses main/println and decodes strings/comments tests; H.
P0-05.02 ✅ Complete src/RustSharp.Syntax/, tests/RustSharp.Tests/SyntaxTests.cs — Stabilize malformed-source diagnostics and source spans. P0-05.01 Missing delimiters/semicolon, invalid escape/line endings and trailing tokens fail with stable code/span in the narrow profile. Original syntax/escape/comment regressions; H.

P0-06: Direct PE and Portable PDB

ID Status Deliverable / ownership Depends on Done when Evidence
P0-06.01 ✅ Complete src/RustSharp.CodeGen.IL/IlAssemblyEmitter.cs, src/RustSharp.Compiler/CompilerDriver.cs — Emit and write the executable PE and runtime configuration. P0-05 hello.dll has a managed entry point and runtimeconfig; output comes directly from IL emission without generated C# program logic. tests/RustSharp.Tests/EmissionTests.cs; H.
P0-06.02 ✅ Complete src/RustSharp.CodeGen.IL/IlAssemblyEmitter.cs, tests/RustSharp.Tests/EmissionTests.cs — Emit source-linked Portable PDB and deterministic bytes. P0-06.01 Nonempty PDB includes documents, sequence points and original-byte checksum; repeat identical input produces identical PE/PDB. PDB document/span/hash and deterministic emission tests; H.

P0-07: Metadata, verifier and determinism

ID Status Deliverable / ownership Depends on Done when Evidence
P0-07.01 ✅ Complete tests/RustSharp.Tests/EmissionTests.cs — Inspect emitted metadata/IL/PDB and on-disk determinism. P0-06 Readers and recorded ilspy inspection resolve entry point, IL stack/tokens and sequence points; repeated PE/PDB/runtimeconfig bytes agree. PEReader/MetadataReader/ilspy and disk emission evidence; H.
P0-07.02 ✅ Complete .config/dotnet-tools.json, eng/Invoke-ILVerify.ps1 — Run pinned standalone IL verification. P0-07.01 dotnet-ilverify 10.0.11 uses explicit System.Private.CoreLib/runtime references and exits zero; command/hash/process/cleanup evidence is archived. Recorded artifacts/p0/hello.ilverify.json; H.

P0-08: CoreCLR executable slice

ID Status Deliverable / ownership Depends on Done when Evidence
P0-08.01 ✅ Complete samples/hello.rs, src/RustSharp.Compiler/CompilationOutput.cs — Produce the runnable first-slice DLL/configuration pair. P0-06 The generated hello output loads under .NET 10 using its emitted configuration. Recorded check/compile and CoreCLR invocation; H.
P0-08.02 ✅ Complete samples/hello.rs, eng/ — Check exact runtime output and exit status. P0-08.01 CoreCLR exits zero and prints exactly Hello from Rust# plus the platform newline. Recorded dotnet artifacts/p0/hello.dll; H.

P0-09: Windows x64 Native AOT

ID Status Deliverable / ownership Depends on Done when Evidence
P0-09.01 ✅ Complete src/RustSharp.Compiler/NativeAotPublisher.cs, tests/RustSharp.Tests/NativeAotTests.cs — Publish through a bounded exclusive temporary SDK host. P0-04, P0-08 Native publish treats warnings as errors and cannot report success before owned host cleanup; no generated C# program logic is introduced. Publisher cleanup-result regression and Windows publish log; H.
P0-09.02 ✅ Complete eng/Invoke-WindowsNativeAotProbe.ps1 — Validate and execute the native AMD64 PE. P0-09.01 Native PE32+ AMD64 executes with zero exit and exact Hello from Rust# output; process and temporary-host cleanup are recorded. W: native publish/run report with PID/parent and format checks.

P0-10: Linux x64 Native AOT

ID Status Deliverable / ownership Depends on Done when Evidence
P0-10.01 ✅ Complete eng/Invoke-LinuxNativeAotProbe.sh, .github/workflows/linux-native-aot.yml — Publish an x86-64 ELF on the native Ubuntu runner. P0-09 Recorded Ubuntu 24.04 x64 run uses the pinned SDK and produces a native Linux artifact. L: native build and ELF-format evidence.
P0-10.02 ✅ Complete eng/Invoke-LinuxNativeAotProbe.sh — Execute Linux output and reconcile bounded cleanup. P0-10.01 ELF exits zero with exact CoreCLR text and complete cleanup; the local WSL SDK skip is not counted as Linux success. L: bounded native execution and cleanup report.

P0-11: rustc differential harness

ID Status Deliverable / ownership Depends on Done when Evidence
P0-11.01 ✅ Complete tools/RustSharp.Conformance/Program.cs, tools/RustSharp.Conformance/fixtures/ — Define and run the four-case vertical differential catalog. P0-03, P0-04 Two run-pass and two compile-fail cases compare against rustc +1.98.0 with matching outcomes/output. Recorded artifacts/conformance/vertical-slice-v1.json; H: 4/4.
P0-11.02 ✅ Complete tools/RustSharp.Conformance/Program.cs — Emit bounded machine-readable differential evidence. P0-11.01 Report identifies profile, denominator, rustc/toolchain versions, diagnostics, limits, process metadata and cleanup; no implicit case omission. H: versioned conformance JSON and zero failed/skipped cases.

P0-12: Typed CLR LIR feasibility

ID Status Deliverable / ownership Depends on Done when Evidence
P0-12.01 ✅ Complete src/RustSharp.CodeGen.IL/ClrLir.cs, tests/RustSharp.Tests/ClrLirTests.cs — Validate locals, calls, branches and returns before IL emission. P0-07 Stack/call type mismatch, invalid target, inconsistent merge and unreachable block cases reject before PE emission. Eight-case CLR LIR family; H.
P0-12.02 ✅ Complete src/RustSharp.CodeGen.IL/ClrLirEmitter.cs, tests/RustSharp.Tests/ClrLirTests.cs — Emit deterministic branch bytecode and run a branch PE. P0-12.01 Valid control flow emits repeatable bytes and its real generated PE returns the expected result. Deterministic bytecode and branch PE execution cases; H.

P0-13: Ownership MIR feasibility

ID Status Deliverable / ownership Depends on Done when Evidence
P0-13.01 ✅ Complete src/RustSharp.CodeGen.IL/OwnershipMir.cs, tests/RustSharp.Tests/OwnershipTests.cs — Prove Copy/Move and shared/mutable borrow state transitions. P0-12 Owned move consumes the source, Copy remains usable, shared borrows coexist, mutable overlap and move-while-borrowed reject. Recorded eight-case ownership family; H.
P0-13.02 ✅ Complete src/RustSharp.CodeGen.IL/OwnershipMir.cs, tests/RustSharp.Tests/OwnershipTests.cs — Prove explicit NLL end, escape rejection and reverse Drop. P0-13.01 The small MIR permits owner reuse after explicit borrow end, rejects escaping references and records deterministic reverse Drop order. NLL/escape/drop-order cases; H; ADR 0004.

P0-14: Bounded generic/trait feasibility

ID Status Deliverable / ownership Depends on Done when Evidence
P0-14.01 ✅ Complete src/RustSharp.Semantics/GenericModel.cs, tests/RustSharp.Tests/VerticalProofTests.cs — Close Option deterministically in the feasibility model. P0-12 Repeated monomorphization has equal closed types and stable textual form. GenericOptionAsync; H; ADR 0005.
P0-14.02 ✅ Complete src/RustSharp.Semantics/, tests/RustSharp.Tests/VerticalProofTests.cs — Resolve the bounded exact/blanket trait subset. P0-14.01 Exact resolution succeeds, missing/ambiguous cases diagnose and depth/work limits terminate; full trait coherence is outside this spike. TraitResolutionAsync; H; ADR 0005.

P0-15: Managed hybrid and static interop

ID Status Deliverable / ownership Depends on Done when Evidence
P0-15.01 ✅ Complete src/RustSharp.Runtime/ManagedHybrid.cs, tests/RustSharp.Tests/VerticalProofTests.cs — Prove owner/borrow guards, DropScope and explicit pinning. P0-13 Shared/exclusive rules and use-after-drop rejection hold; reverse cleanup and pin release pass the runtime feasibility probes. ManagedBorrow/OwnerUseAfterDrop/DropScope/PinnedArray cases; H.
P0-15.02 ✅ Complete src/RustSharp.Runtime/ManagedHybrid.cs, docs/adr/0006-managed-hybrid-runtime-spike.md — Prove the explicit static generic .NET call boundary. P0-15.01 ManagedInterop.Call uses IManagedCall without reflection or runtime code generation; this is a runtime mapping proof, not complete compiler lifetime lowering. ManagedInteropAsync in VerticalProofTests; H; ADR 0006.

P0-16: File/TCP/async/SQLite probes

ID Status Deliverable / ownership Depends on Done when Evidence
P0-16.01 ✅ Complete tools/RustSharp.Smoke/Program.cs — Execute bounded file, loopback TCP and async probes. P0-13, P0-15 File roundtrip, TCP exchange and async completion/cancellation pass without reflection-based code generation; temporary resources are reclaimed. H: p0-io file-roundtrip/loopback-tcp/async-completion-cancellation.
P0-16.02 ✅ Complete tools/RustSharp.Smoke/Program.cs, .github/workflows/ — Execute parameterized SQLite and the strict four-probe gate. P0-16.01 Both CI platforms run the SQLite transaction and pass 4/4 with zero failures/skips; missing local sqlite3 remains explicitly blocked. H: 4/4 smoke; W installs/verifies SQLite 3.53.4.

P0-17: Two-platform CI and archives

ID Status Deliverable / ownership Depends on Done when Evidence
P0-17.01 ✅ Complete .github/workflows/windows-p0.yml, .github/workflows/linux-native-aot.yml — Run clean Windows/Linux x64 CI at the recorded SHA. P0-07, P0-10, P0-11 Commit 286f139 passes both recorded workflows; each includes tests, differential, smoke, verifier and native execution. W and L workflow conclusions and commit provenance.
P0-17.02 ✅ Complete .github/workflows/, eng/ — Archive and inspect the fixed platform evidence bundles. P0-17.01 Each archive contains 14 files/seven JSON reports; both have 73/73 tests, 4/4 vertical differential, 4/4 IO smoke and verifier/AOT evidence. W/L archives; 12 shared syntax/name-resolution source hashes agree.

P0-GATE: Historical phase exit

ID Status Deliverable / ownership Depends on Done when Evidence
P0-GATE.01 ✅ Complete ROADMAP.md, ROADMAP_zh.md — Reconcile the historical vertical-slice acceptance set. P0-01, P0-02, P0-03, P0-04, P0-05, P0-06, P0-07, P0-08, P0-09, P0-10, P0-11, P0-12, P0-13, P0-14, P0-15, P0-16, P0-17 All original P0 artifacts/decisions and executable feasibility probes have recorded evidence; the 73-case CI set and four-case vertical oracle set passed at 286f139. H: 73/73 tests and 4/4 vertical differential; original P0 completion record.
P0-GATE.02 ✅ Complete eng/Invoke-WindowsNativeAotProbe.ps1, eng/Invoke-LinuxNativeAotProbe.sh, eng/Invoke-ILVerify.ps1 — Accept the recorded two-platform IL/CoreCLR/Native AOT proof. P0-GATE.01 Real Windows AMD64 PE and Linux x86-64 ELF execute the vertical slice with exact output; IL verification and owned-host/process cleanup pass. W/L native/verifier/process reports, not local skipped probes.
P0-GATE.03 ✅ Complete ROADMAP.md, ROADMAP_zh.md, docs/compatibility.md — Retain P0 completion with its explicit scope boundary. P0-GATE.02 The recorded clean builds and 14-file archives close P0 only; full source-level borrow/Drop, language/library profiles and later RID gates remain separately owned. Historical 286f139 completion record and compatibility non-promises.