Skip to main content

Crate bnto_core

Crate bnto_core 

Source

Re-exports§

pub use context::NoopContext;
pub use context::ProcessContext;
pub use definition_schema::definition_json_schema;
pub use errors::BntoError;
pub use events::PipelineEvent;
pub use events::PipelineReporter;
pub use executor::execute_pipeline;
pub use metadata::Constraints;
pub use metadata::Dependency;
pub use metadata::InputCardinality;
pub use metadata::NodeCategory;
pub use metadata::NodeMetadata;
pub use metadata::NodeTypeInfo;
pub use metadata::ParamCondition;
pub use metadata::ParamConditionEntry;
pub use metadata::ParameterDef;
pub use metadata::ParameterType;
pub use metadata::all_node_types;
pub use pipeline::InputMode;
pub use pipeline::IterationMode;
pub use pipeline::PipelineDefinition;
pub use pipeline::PipelineFile;
pub use pipeline::PipelineFileResult;
pub use pipeline::PipelineNode;
pub use pipeline::PipelineResult;
pub use pipeline::PipelineSettings;
pub use pipeline::first_processing_node_id;
pub use pipeline::resolve_input_mode;
pub use processor::BatchFile;
pub use processor::BatchInput;
pub use processor::NodeProcessor;
pub use progress::ProgressReporter;
pub use registry::NodeRegistry;

Modules§

context
Controlled system access for processors that need external tools. Browser gets NoopContext, CLI gets NativeContext, desktop gets SandboxedContext.
definition_schema
Definition JSON Schema — validates .bnto.json files. Generates a JSON Schema (Draft 2020-12) describing the Definition structure so any consumer can validate recipe files without reimplementing TS types.
errors
Error types for the WASM engine. Every error that can happen during node execution is defined here.
events
Structured pipeline events — rich progress reporting for multi-node execution. Powers per-node status highlighting in the editor, progress bars, and error display.
executor
The pipeline executor — walks nodes, iterates files, chains outputs. This is the engine’s brain. See .claude/strategy/engine-execution.md.
metadata
Node metadata types — self-describing processor definitions. Each processor declares its name, category, parameters, accepted MIME types, and whether it runs in the browser. Powers the node_catalog() WASM export.
pipeline
Pipeline definition types — what the engine receives to execute. Mirrors the TypeScript PipelineDefinition / PipelineNode types.
processor
The NodeProcessor trait — the contract every node type must implement. If you’re building a new node (like image compression), you implement this.
progress
Progress reporting — how nodes tell the UI “I’m 50% done”. Uses target-agnostic closures (no WASM dependency).
registry
Node registry — maps node type keys (e.g., “image-compress”) to processors. Replaces the JS-side wasmLoader.ts registry.

Constants§

DEFAULT_QUALITY
Default quality when not specified by the user (1-100 scale). 80 is the industry sweet spot: significant file size savings with barely noticeable quality loss for most photos. Used by all image operations (compress, resize, convert).
FORMAT_VERSION
The current .bnto.json format version.

Functions§

version
Returns the version of the bnto-core crate.