nub_arch_x86/test_abi.rs
1//! FN_ID constants for the test/bench guest binaries.
2//!
3//! These are not part of the production RPC surface — they live in
4//! `nub-arch-x86` (not `nub-arch-x86-abi`) and are only exposed by
5//! the `nub-arch-x86-tests` and `nub-arch-x86-benches` binaries.
6//! Host-side test/bench code (in `nub/tests/`, `nub/benches/`, etc.)
7//! imports these constants via the lib.
8
9/// Smoke probe — returns 42u64 rkyv-encoded.
10pub const FN_ID_TEST_SMOKE: u32 = 100;
11
12/// Test-only scheduler probe. Payload is two raw `InvokePacket`s concatenated;
13/// output is rkyv-encoded `[InvocationResult; 2]`.
14pub const FN_ID_TEST_INVOKE_TWO_SERIAL: u32 = 101;
15
16/// Bench: allocate `N` × `Arc<Page>` where `Page` is a 4 KiB
17/// page-aligned block.
18///
19/// - Input: `u32` LE = `N`.
20/// - Output: `u64` LE = elapsed RDTSC cycles total. The host
21/// divides by `N` to get per-Arc cost.
22pub const FN_ID_BENCH_ARC_PAGE_ALLOC: u32 = 200;