Skip to content

Release 1.0.1-beta.6: extract CLR introspection into NfClr.Core (PackageReference)#46

Merged
begeistert merged 10 commits into
masterfrom
extract-clr-core
Jun 26, 2026
Merged

Release 1.0.1-beta.6: extract CLR introspection into NfClr.Core (PackageReference)#46
begeistert merged 10 commits into
masterfrom
extract-clr-core

Conversation

@begeistert

Copy link
Copy Markdown
Collaborator

Draft — ready for 1.0.1-beta.6 when you are.

Extracts the chip-agnostic nanoCLR introspection (ClrInspector, ClrLayout, heap walk, ClrSession) out of RP2040Sharp.NanoFramework.TestKit into the shared NfClr.Core library, and makes NanoClrHarness a thin facade over ClrSession via an IClrHost/IClrMemory adapter (Rp2040ClrHost / Rp2040ClrMemory).

Changes

  • The CLR knowledge now lives once in NfClr.Core (published 1.0.0-beta.1); this kit only supplies the RP2040 adapter.
  • Firmware symbols/layout/checksums derive from the nanoCLR ELF/DWARF when present.
  • RP2040Sharp.NanoFramework.TestKit depends on NfClr.Core via PackageReference (no cross-repo project reference). The published package declares a clean NfClr.Core 1.0.0-beta.1 dependency.

Verified

  • Builds against the published NfClr.Core 1.0.0-beta.1 from nuget.org.
  • Pack declares the NfClr.Core dependency; analyzer + buildTransitive targets + BUSL license intact.

Merging this and tagging v1.0.1-beta.6 publishes the updated testkit (via Trusted Publishing, now on master).

🤖 Generated with Claude Code

begeistert and others added 10 commits June 25, 2026 16:46
…ling to the harness

ClrInspector and ClrLayout move to the chip-agnostic NanoFramework.Clr.Core and now read through an
IClrMemory; this kit supplies the RP2040 adapter (Rp2040ClrMemory over the emulator bus). The CLR
walker no longer references RP2040 at all, so STM32/ESP32 kits will reuse it instead of duplicating it.

The harness gains CaptureHeap() (dotMemory-style heap snapshots) and ProfileCalls() (dotTrace-style
per-method call counts + instructions/cycles).
The run/profile logic moves to NanoFramework.Clr.Core's ClrSession; this kit now supplies Rp2040ClrHost
(IClrHost over PicoSimulation + NanoFirmware, bridging the profiling observer and exposing R0/R1) and
NanoApp.FromDeployment (wrap a prebuilt deployment.bin). NanoClrHarness keeps its public API but
delegates everything. Reference path follows the NanoFramework.Clr umbrella rename.
…rMemory

Rp2040ClrMemory exposes RamStart/RamEnd (RP2040 SRAM); Rp2040ClrHost composes it instead of repeating
the bus reads.
…ymbols

The profiler's ClrLayout is now built from these DWARF-derived offsets (with a per-field fallback), so it
adapts to the firmware build instead of hardcoding a nanoCLR version's struct layout.
…en present

NanoFirmware.FromDirectory reads nanoCLR*.elf via FirmwareElf and falls back to firmware.manifest.json
only when no ELF ships — no hand-written manifest needed.
Replace the long-lived NUGET_API_KEY with NuGet/login@v1: the workflow mints a
short-lived key from the GitHub OIDC token at push time (permissions: id-token: write).

Requires a Trusted Publishing policy on nuget.org (Repository Owner: PyMCU,
Repository: RP2040Sharp, Workflow File: publish.yml) and a repo secret NUGET_USER
(nuget.org profile name). The NUGET_API_KEY secret can be deleted once verified.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-beta.1)

Now that NfClr.Core ships on nuget.org, replace the cross-repo ProjectReference
(..\..\..\NfClr\src\NfClr.Core) with a PackageReference. The published TestKit now
declares a clean NfClr.Core dependency instead of needing the sibling repo checked out.

Prepares the extract-clr-core branch for the 1.0.1-beta.6 release.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…hing)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@begeistert
begeistert marked this pull request as ready for review June 26, 2026 05:57
@begeistert
begeistert requested a review from lmSeryi as a code owner June 26, 2026 05:57
@begeistert
begeistert merged commit a739e60 into master Jun 26, 2026
4 checks passed
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