Expand description
Ruso VM: execute compiled bytecode against HTTP, DNS, TCP, and UDP targets.
Compilers (e.g. ruso-script) must target opcode::VERSION and the
instruction set documented in opcode.
§Developer documentation
Re-exports§
pub use contract::BodyValue;pub use contract::CmpOp;pub use contract::CmpValue;pub use contract::EvidenceKind;pub use contract::ExtractSource;pub use contract::FieldKind;pub use contract::HttpMethod;pub use contract::InlinePart;pub use contract::InlinePartBody;pub use contract::MatchPredicate;pub use contract::ObjectBody;pub use contract::QualifiedField;pub use contract::QualifiedMatch;pub use contract::Severity;pub use opcode::BytecodeProgram;pub use opcode::MAGIC;pub use opcode::Opcode;pub use opcode::Pc;pub use opcode::VERSION;pub use util::truncate_str;
Modules§
- contract
- Shared types embedded in Ruso bytecode (constant pools and probe specs).
- disasm
- Human-readable bytecode disassembly.
- opcode
- Opcode and bytecode wire-format contract (version 1).
- util
- Shared utility helpers with no domain dependencies.
Structs§
- Check
Metadata - The
metadata { … }block of a check — describes the finding it emits. - Execution
Result - The outcome of one
Executor::run: whether a finding was produced, plus the report, port-check details, and final variable state. - Executor
- Executes a compiled program against a target. Construct one with
from_bytes,from_bytecode, orfrom_program, then callrun. - Executor
Config - Runtime configuration for an
Executor: the target base URL plus the network, TLS, and safety knobs. UseExecutorConfig::defaultand override the fields you care about. - Finding
- A single positive result: the check’s metadata resolved into a concrete
finding, plus the evidence captured during the run. Built from
CheckMetadataviaFinding::from_metadata. - Http
Request Spec - Port
Cache - Port
Check - Result of probing one
host:port(from cache or live TCP connect). - Program
Spec - The non-executable part of a compiled program: the probe table and the
finding metadata. The instruction stream lives in
BytecodeProgram. - Report
- A run’s findings. At most one finding is produced per script execution, so this holds zero or one entry.
- Socket
Probe Spec - Generic socket options (shared by dns/tcp/udp probes).
Enums§
- Bytecode
Error - Probe
Kind - A probe definition, tagged by transport.
- Runtime
Error - An error that aborts execution. Most variants carry a message; the
#[from]variants wrap lower-level errors (bytecode decode, HTTP, I/O, regex). A failedmatchdoes not produce one of these — onlyassert,fail, and genuine transport/decoding failures do. - Variable
Value
Functions§
- build_
client - bytes_
to_ hex - bytes_
to_ hex_ dump - decode_
bytecode - encode_
bytecode - format_
human - hex_
to_ bytes - load_
bytecode_ input - Decode a hex string into raw bytecode bytes.
- parse_
duration - Parse a duration string with one of the supported suffixes: