Expand description
Opcode and bytecode wire-format contract (version 1).
§File layout (RUSO + version byte)
- Metadata (name, description, impact, severity, author, report title)
- Probe table (HTTP / DNS / TCP specs)
- String pool
- Matcher pool (
QualifiedMatch) - Extract pool (
ExtractSource) - Evidence pool (
EvidenceKind) - Payload pool (raw bytes for
Sendoverrides) - Instruction stream (
Opcodediscriminants)
§Instruction opcodes (wire u8)
| Byte | Variant | Payload |
|---|---|---|
| 1 | Set | name_id: u32, value_id: u32 |
| 2 | Send | probe_id: u32, optional payload index |
| 3 | Match | matcher_id: u32 |
| 4 | MatchAll | start: u32, len: u16 |
| 5 | MatchAny | start: u32, len: u16 |
| 6 | Assert | matcher_id: u32 |
| 7 | Extract | name_id: u32, source_id: u32 |
| 8 | IfMatch | matcher_id: u32, else_pc: u32 |
| 9 | Save | from_id: u32, to_id: u32 |
| 10 | Evidence | kind_id: u32 |
| 11 | Retry | probe_id: u32, count: u32 |
| 12 | RetryDelay | duration_id: u32 |
| 13 | Sleep | duration_id: u32 |
| 14 | Stop | — |
| 15 | Fail | — |
| 16 | Continue | — |
| 17 | Exit | — |
| 18 | (reserved) | was Repeat, removed |
| 19 | LoopBack | — |
| 20 | Break | — |
| 21 | SetList | name_id: u32, start: u32, len: u16 |
| 22 | ForList | item_id: u32, start: u32, len: u16, end_pc: u32 |
| 23 | ForVar | item_id: u32, list_id: u32, end_pc: u32 |
Compilers must emit crate::BytecodeProgram compatible with crate::VERSION.
Structs§
- Bytecode
Program - Compiled script ready for the executor (probes, metadata, and instruction stream).
Enums§
Constants§
- MAGIC
- OP_
ASSERT - OP_
BREAK - OP_
CONTINUE - OP_
EVIDENCE - OP_EXIT
- OP_
EXTRACT - OP_FAIL
- OP_
FOR_ LIST - OP_
FOR_ VAR - OP_
IF_ MATCH - OP_
LOOP_ BACK - OP_
MATCH - OP_
MATCH_ ALL - OP_
MATCH_ ANY - OP_
RETRY - OP_
RETRY_ DELAY - OP_SAVE
- OP_SEND
- OP_SET
- OP_
SET_ LIST - OP_
SLEEP - OP_STOP
- VERSION
Type Aliases§
- Pc
- Instruction pointer index into
BytecodeProgram::code.