nx_swhid.nx
buildroot/runtime/nx_swhid.nx
about
nx_swhid.nx -- thin CLI over nx_swhid_lib. Compute the ISO/IEC 18670:2025 identifier of a file.
The construction lives in the LIB so this command line and any in-process consumer prove the SAME
code, and so the gate can IMPORT the logic rather than fork this binary -- a fork is a boundary the
mutation harness is blind across, and a gate that cannot be mutated returns a GREEN that reads like
a proof while proving nothing.
WHY A LIBRARIAN EMITS THIS ALONGSIDE ITS OWN sha256 AND NOT INSTEAD OF IT:
the SWHID is what the WORLD can check -- computed identically by everyone, from the bytes alone,
with no registry and no forge in the loop, and accepted as an identifier by SPDX 2.3 Annex F and
DataCite 4.7. The sha256 plus byte length is what WE trust, because SHA-1 has chosen-prefix
collisions (SHAttered, 2017) and is therefore an interoperable NAME, never tamper evidence.
Emitting only the SWHID would be a downgrade wearing a standard's number.
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_swhid_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 18 | func swc_puts(s: *u8) -> i64 { sys_write(1, s, sw_len(s)); return 0 } |
| 20 | func swc_num(v: i64) -> i64 |
| 28 | func main(argc: i64, argv: *i64) -> i64 |