Skip to main content

solana_ratchet_core/
lib.rs

1//! Core IR and rule engine for [`ratchet`](https://github.com/saicharanpogul/ratchet).
2//!
3//! This crate holds the framework-agnostic representation of a Solana program's
4//! public surface — accounts, instructions, enums, PDAs — and the rule engine
5//! that diffs two versions of that surface and classifies each change as
6//! [`Severity::Additive`], [`Severity::Unsafe`], or [`Severity::Breaking`].
7
8pub mod diagnostics;
9pub mod engine;
10pub mod preflight;
11pub mod rule;
12pub mod rules;
13pub mod surface;
14
15pub use diagnostics::{Finding, Path, Report, Severity};
16pub use engine::{check, default_rules};
17pub use preflight::{default_preflight_rules, preflight, PreflightRule};
18pub use rule::{CheckContext, Rule};
19pub use surface::{
20    AccountDef, AccountInput, ArgDef, Discriminator, EnumVariant, EnumVariantFields, ErrorDef,
21    EventDef, FieldDef, InstructionDef, PdaSpec, PrimitiveType, ProgramSurface, Seed, TypeDef,
22    TypeRef,
23};