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

Method entry

crates/aiur/src/vk_codec.rs:78–96  ·  view source on GitHub ↗
(&mut self, e: &Entry)

Source from the content-addressed store, hash-verified

76/// Sentinel for `None` in the preprocessed-index trailer.
77const NO_PREP_INDEX: u16 = u16::MAX;
78
79// ════════════════════════════════════════════════════════════════════════════
80// Encoder — System<AiurConfig> -> bytes
81// ════════════════════════════════════════════════════════════════════════════
82
83fn push_u16(buf: &mut Vec<u8>, v: usize) {
84 let v = u16::try_from(v).expect("vk header field exceeds u16");
85 buf.extend_from_slice(&v.to_le_bytes());
86}
87
88fn push_u32(buf: &mut Vec<u8>, v: usize) {
89 let v = u32::try_from(v).expect("vk field exceeds u32");
90 buf.extend_from_slice(&v.to_le_bytes());
91}
92
93/// Node ids on the wire are u16: per-circuit graphs are far below 65k
94/// nodes (the whole kernel system is ~140k across 800+ circuits).
95fn push_node_id(buf: &mut Vec<u8>, id: NodeId) {
96 let id = u16::try_from(id.0).expect("node id exceeds u16 (vk wire format)");
97 buf.extend_from_slice(&id.to_le_bytes());
98}
99

Callers 15

set_infoMethod · 0.80
writeMethod · 0.80
exprMethod · 0.80
extendFunction · 0.80
decompile_block_aux_genFunction · 0.80
decompile_envFunction · 0.80
build_ref_graphFunction · 0.80
ground_constsFunction · 0.80
insert_altMethod · 0.80
compile_env_with_optionsFunction · 0.80
replace_if_nestedMethod · 0.80

Calls 2

usizeMethod · 0.80
u32Method · 0.45

Tested by 1