From 55f6a43dc23269e383b0665f8895639dbb2744d8 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Thu, 16 Apr 2026 09:39:26 +0300 Subject: [PATCH] packages/core: revise readme; elaborate on supported Nix impls Signed-off-by: NotAShelf Change-Id: Ibff4509c97cc205854ecab05320618f06a6a6964 --- packages/core/README.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/packages/core/README.md b/packages/core/README.md index fd8706c..56ce2de 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -1,7 +1,11 @@ # @ns/core -Core types and parsing logic for Nix evaluator statistics. This package is -framework-agnostic and can be used in any JavaScript/TypeScript environment. +Core types, parsing logic for Nix evaluator statistics, and various bits from +the web component that the CLI may interact with in the future. The `@ns/core` +package contains the truly "generic" logic that can be used around the +workspace, or even outside it. This package is framework-agnostic and can be +used in any JavaScript/TypeScript environment. Which is to say that you can use +it to make your own statistics viewer without doing any heavy lifting. ## Usage @@ -20,8 +24,14 @@ const change = calculateChange(stats.nrThunks, previousStats.nrThunks); console.log(`Thunks changed by ${change.percent.toFixed(2)}%`); ``` -## Version Compatibility +## Nix Version/Implementation Compatibility -The parser handles different Nix implementations (Nix, Lix, Snix, etc.) by -checking for field existence in the raw JSON, since not all implementations -expose the same statistics. +There are currently 4 competing implementations of Nix, and only two of those +are considered first-class. The parser handles different implementations the +best it can by checking the field existence in the raw JSON, but it is not able +to handle new fields. It is unfortunate that not all implementations expose the +same statistics. + +Worth noting that besides Lix and Nix, there are and will likely be more +implementations. If you want _yours_ to be supported as a first class citizen, +please submit a pull request.