Skip to content

Commit aea7960

Browse files
committed
doc(native-mode): add docstring for get_elf and get_cycles
1 parent 0980983 commit aea7960

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

adapters/native/src/host.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,15 @@ impl ZkVmExecutor for NativeHost {
3939
Ok(public_values)
4040
}
4141

42+
/// Returns an empty slice as there is no ELF in native mode.
4243
fn get_elf(&self) -> &[u8] {
4344
&[]
4445
}
4546

47+
/// Returns 0 as cycle counting is not applicable in native mode.
48+
///
49+
/// For RISC-V ZkVms, cycles are obtained by emulating execution and counting
50+
/// instructions. There is no straightforward equivalent for native execution.
4651
fn get_cycles<'a>(
4752
&self,
4853
_input: <Self::Input<'a> as zkaleido::ZkVmInputBuilder<'a>>::Input,

0 commit comments

Comments
 (0)