MCPcopy Create free account
hub / github.com/argumentcomputer/ix / build_anon_work

Function build_anon_work

crates/ffi/src/kernel.rs:1321–1345  ·  view source on GitHub ↗

One pass over `env.consts`: enumerate work items + the kernel-checkable target addresses (one per result slot). Skips projection constants (covered by their parent block) and Muts addresses themselves (blocks aren't kernel KIds). Delegates the enumeration to [`ix_kernel::anon_work::build_anon_work`] (shared with the SP1/Zisk guests) and layers the FFI's per-target result-slot bookkeeping on top.

(
  env: &IxonEnv,
)

Source from the content-addressed store, hash-verified

1319// without consulting metadata.
1320
1321/// FFI-side anon work item with per-target result-slot indices.
1322///
1323/// Wraps [`ix_kernel::anon_work::AnonWorkItem`] with the index
1324/// mapping the parallel runner needs to write per-target results
1325/// into a flat `OnceLock<CheckRes>` vector for the FFI return ABI.
1326#[derive(Clone, Debug)]
1327enum AnonWorkItem {
1328 /// A standalone (non-mutual, non-projection) constant.
1329 Standalone { result_idx: usize, addr: Address },
1330 /// A Muts block. `primary_addr` is the first member's projection address;
1331 /// `result_idxs` enumerates every kernel-checkable target produced by
1332 /// the block (each member's projection + each ctor's CPrj of inductive
1333 /// members), all sharing the same check result via the kernel's
1334 /// block coordination.
1335 Block { primary_addr: Address, result_idxs: Vec<usize> },
1336}
1337
1338/// One pass over `env.consts`: enumerate work items + the kernel-checkable
1339/// target addresses (one per result slot). Skips projection constants
1340/// (covered by their parent block) and Muts addresses themselves
1341/// (blocks aren't kernel KIds).
1342///
1343/// Delegates the enumeration to
1344/// [`ix_kernel::anon_work::build_anon_work`] (shared with the
1345/// SP1/Zisk guests) and layers the FFI's per-target result-slot
1346/// bookkeeping on top.
1347/// Assign result slots to a set of kernel work items — the indexing step
1348/// shared by the whole-env check (every item) and the per-constant closure

Callers 2

rs_kernel_check_anonFunction · 0.70
profile_anon_ixeFunction · 0.70

Calls 3

pushMethod · 0.80
lenMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected