Open and answer this issue on GitHub.
ready · opened 2026-11-08 · updated 2026-11-08 · 0 comments
A Nikaia program is unsafe only in unsafe { assume(…) } (ADR-376) and in calls into C (ADR-302); a build with remove-* switches on adds nikaia_std::proven calls (ADR-378). Today nikaia check --asserts lists the package’s assumes, and nothing lists every unsafe site of a program with its dependencies.
unsafe per function: each unsafe { … } in the body as "assume at FILE:LINE" or "extern NAME at FILE:LINE", sorted by place, absent when empty; read in ledger.nika, written in ledger_text.nika, the field in ty.nika, filled where the trusted column is filled (#1357: package_ledger_checked in modules.rs, tools/trust.nika walks calls). Add the row to Part III 13.5’s table.--unsafe on nikaia build, check and lower: every site of the program and of every package it reaches (from their ledgers), grouped by package; each Rust crate the build depends on, with whether a description covers it (ADR-290); with remove-* on, the count of dropped checks per kind. One line saying there is none when there is none. Describe the flag in Part III beside --trust and --asserts.unsafe-sites = "none" in nikaia.toml ([build]): a site in the package itself is NK1360 (reserved for this), naming the site; "listed" is the default. Part III 13.3 and the code table.tests/compiler/: a program with one assume and one extern call — its committed ledger shows both; --unsafe prints them and a dependency’s site; a program with none prints the one line; unsafe-sites = "none" refuses the assume with NK1360.The ledger records every unsafe site, --unsafe lists them over the program and its dependencies, and unsafe-sites = "none" refuses one.