Skip to main content

Crate ruso_script

Crate ruso_script 

Source
Expand description

Parse Ruso Scripting Language (RSL) source into an AST and compile to ruso-runtime bytecode.

§Developer documentation

Re-exports§

pub use script::ast;
pub use script::ast::Program;
pub use script::ast::Stmt;
pub use script::ParseError;
pub use script::parse;

Modules§

script

Structs§

BytecodeProgram
Compiled script ready for the executor (probes, metadata, and instruction stream).
QualifiedMatch
A single matcher: a response field tested against a predicate.

Enums§

CompileError
EvidenceKind
A proof string attached to a finding. Every rule names an explicit source (.body, .response, or .header "<name>"); an optional regex extracts capture group 1 (or the whole match) from that source instead of taking it whole.
ExtractSource
Where an extract pulls a value from (HTTP only).
LoadError
Error from load_program: reading the file failed, or its contents did not parse.
Severity
Finding severity, in ascending order of urgency (Info is the catch-all used when a check declares no severity).

Functions§

compile
compile_program
Compile a parsed Program into a BytecodeProgram.
compile_to_bytes
Compile a Program and serialize it to a raw .rbc byte buffer.
encode_bytecode
load_program
Read and parse an .rsl file into a Program AST.
run
Compile a Program and run it against a single target in one step.
run_bytecode
Run an already-compiled BytecodeProgram against a single target.
run_bytes
Decode a raw .rbc byte buffer and run it against a single target.
run_program
Run a pre-shared Arc<BytecodeProgram> against a single target.