Skip to main content

onnx_export_rs/
lib.rs

1//! ONNX export for inference-only canonical machine-learning models.
2//!
3//! The crate deliberately separates source-library adapters from canonical
4//! representations and ONNX graph generation. Values are narrowed to `f32`
5//! when exported for maximum runtime compatibility.
6
7pub mod adapters;
8pub mod canonical;
9pub mod error;
10pub mod exporters;
11pub mod graph_builder;
12pub mod proto;
13#[cfg(feature = "validate")]
14pub mod validate;
15
16pub use error::{Error, Result};
17pub use graph_builder::{save_to_file, to_bytes};
18
19/// ONNX intermediate-representation version emitted by this crate.
20pub const IR_VERSION: i64 = 8;
21/// Default ONNX operator-set version emitted by this crate.
22pub const OPSET_VERSION: i64 = 13;
23/// ONNX-ML operator-set version used by tree exporters.
24pub const ML_OPSET_VERSION: i64 = 3;