Extracted from scalus.cardano.ledger.PlutusScriptEvaluator so that profiles produced outside the ledger — test suites that evaluate UPLC directly, via ScalusTest.runWithProfileReport — land on disk in exactly the same shape, and tools such as the Scalus VS Code extension consume both identically.
Public for tooling, but in scalus.uplc.internal and thus with no binary-compatibility guarantees: the on-disk format is the contract, not this API.
JVM implementation; the JS build substitutes a no-op stub of the same FQN, keeping ProfileFormatter (HTML/CSS/JS templates, Tarjan pass), the jsoniter manifest codec and the UPLC source-map renderer dead-code-eliminated from the published scalus.js bundle, which transaction builders depend on and which must stay small.
Render data to each configured scalus.cardano.ledger.ProfileOutput (console / files). File destinations are prefixed with the script key so per-redeemer profiles don't collide, and are also recorded in profile-manifest.json (see writeManifest). HTML output annotates source lines when the source file is readable from the CWD.
Render data to each configured scalus.cardano.ledger.ProfileOutput (console / files). File destinations are prefixed with the script key so per-redeemer profiles don't collide, and are also recorded in profile-manifest.json (see writeManifest). HTML output annotates source lines when the source file is readable from the CWD.
Value parameters
onConsole
sink for scalus.cardano.ledger.ProfileDestination.Console output, so callers keep their own logger.
uplcTerm
the evaluated program's term, when the caller has it in annotated form. With scalus.cardano.ledger.ProfileLevel.Full, and only alongside at least one rendered profile file, it adds a .uplc.json source map (the UPLC text plus text-range → Scala-source spans) to the report, indexed as format "uplc". It is not a scalus.cardano.ledger.ProfileFormat because those are rendered from ProfilingData, which carries no term. Terms decoded from CBOR carry no annotations, and nothing is written for them.
Schema version of profile-manifest.json. Bump on any incompatible change to its shape so consumers (e.g. the Scalus VS Code extension) can detect and reject manifests they don't understand.
Schema version of profile-manifest.json. Bump on any incompatible change to its shape so consumers (e.g. the Scalus VS Code extension) can detect and reject manifests they don't understand.