NfClr.Core
1.0.0-beta.1
dotnet add package NfClr.Core --version 1.0.0-beta.1
NuGet\Install-Package NfClr.Core -Version 1.0.0-beta.1
<PackageReference Include="NfClr.Core" Version="1.0.0-beta.1" />
<PackageVersion Include="NfClr.Core" Version="1.0.0-beta.1" />
<PackageReference Include="NfClr.Core" />
paket add NfClr.Core --version 1.0.0-beta.1
#r "nuget: NfClr.Core, 1.0.0-beta.1"
#:package NfClr.Core@1.0.0-beta.1
#addin nuget:?package=NfClr.Core&version=1.0.0-beta.1&prerelease
#tool nuget:?package=NfClr.Core&version=1.0.0-beta.1&prerelease
NfClr
A memory and performance profiler for .NET nanoFramework — dotMemory / dotTrace for microcontrollers. It introspects a running nanoCLR (on the cycle-accurate emulator, no physical board) and answers the two questions every embedded developer asks: what's using my RAM, and where is my time going?
$ nfprof memory --firmware ./fw --deployment app.bin --until SetupDone
## Managed heap used 14 400 B · free 217 056 B · total 231 456 B (123 objects)
| type | objects | bytes |
| PioStateMachineConfig | 3 | 756 |
| PioInstructionRef | 29 | 696 |
| PioProgram | 3 | 540 |
| "WS2812 ready" | 1 | 28 |
## GC 3 collections
Real managed types — not "object: 40" — strings with their values, GC counters. And it exports the
full heap as a Chrome DevTools .heapsnapshot and traces as a speedscope flame graph, so the
rich, interactive UI comes from mature open tools — nothing to build, nothing to license.
What it gives you
| dotMemory side | dotTrace side | |
|---|---|---|
| In the report | heap snapshot by real type, allocation diffs, biggest consumers, GC stats | sampling profile: self-time per method |
| Open-tool export | --format heapsnapshot → Chrome DevTools (retained sizes, dominator tree, retainers) |
--format speedscope → speedscope.app (flame graph) |
Quick start
dotnet tool install -g NfClr.Tool # provides `nfprof`
# What types use memory (Markdown for CI/PR, or --format json)
nfprof memory --firmware ./fw --deployment app.bin --until SetupDone
# The full object graph → drop heap.heapsnapshot into Chrome DevTools › Memory › Load
nfprof memory --firmware ./fw --deployment app.bin --until SetupDone \
--format heapsnapshot --out heap.heapsnapshot
# Where time goes → open trace.speedscope.json at https://speedscope.app
nfprof calls --firmware ./fw --deployment app.bin --until SetupDone \
--instructions 5000000 --format speedscope --out trace.speedscope.json
# What an operation allocated (snapshot A → B)
nfprof memory --firmware ./fw --deployment app.bin --diff --from SetupDone --until FrameRendered
--firmware is a directory with nanoBooter*.bin, nanoCLR*.bin and a firmware.manifest.json
(symbol addresses, derived from the build's ELF). --until <symbol> runs into your code first.
Architecture
The nanoCLR's in-RAM layout is identical across the chips it runs on, so that knowledge lives once. Everything is chip-agnostic except a thin per-chip adapter — the same core serves every board and the tool. Profiles export to open formats, so the heavy UI is delegated to Chrome DevTools and speedscope.
NfClr.Core the nanoCLR knowledge: heap walk, reference graph, call stacks,
(IClrMemory / IClrHost) type resolution — over a read/run abstraction. No chip.
▲
per-chip test kit the only chip-specific seam: an IClrMemory/IClrHost adapter
(RP2040 today; STM32/ESP32) + the flash layout. STM32/ESP32 = just write their adapter.
▲
NfClr.Profiling ProfileReport (Markdown/JSON), Speedscope, V8 .heapsnapshot.
▲
nfprof (dotnet tool) composition root: wires a concrete chip into the profiler.
Status
Mature for the common questions: real types, allocation diffs, GC, self-time profiling, and a navigable heap graph in DevTools. Known edges: sampling is per-emulated-instruction (deterministic and reproducible, rather than wall-clock); the graph roots from objects with no in-heap referrers (a close proxy for the GC root set); array elements are followed, value-type field internals are not.
License
Business Source License 1.1 (converts to MIT on the Change Date). See LICENSE-BUSL.txt.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on NfClr.Core:
| Package | Downloads |
|---|---|
|
RP2040Sharp.NanoFramework.TestKit
Boot a deployed .NET nanoFramework app on the RP2040Sharp emulator: firmware discovery, deployment assembly from .pe metadata, and a native-checksum compatibility guard. Run your real deployed C# on the emulated chip and assert against it from xUnit — managed static and instance fields by name, run-until-managed-method, and a NanoSymbols source generator that emits strongly-typed symbols for your app's methods and static fields. |
|
|
NfClr.Profiling
A dotMemory/dotTrace-style profiler for a running nanoFramework CLR, built on NfClr.Core. Captures managed-heap snapshots and method call profiles, diffs them, and emits reports as Markdown (CI/PR), JSON (source of truth) and speedscope (open flame-graph viewer). Chip-agnostic — works over any IClrHost the per-chip test kits supply. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-beta.1 | 102 | 6/26/2026 |