Expand description
§Asset Importer
Comprehensive Rust bindings for the Assimp 3D asset import library.
This crate provides safe, idiomatic Rust bindings for Assimp, offering
more complete functionality than existing alternatives like russimp
.
§Features
- Complete API coverage: Import, export, and post-processing
- Memory safety: Safe Rust abstractions over raw C API
- Zero-cost abstractions: Minimal overhead over direct C API usage
- Custom I/O: Support for custom file systems and progress callbacks
- Modern Rust: Uses latest Rust features and idioms
§Quick Start
use asset_importer::{Importer, postprocess::PostProcessSteps};
let importer = Importer::new();
let scene = importer
.read_file("model.fbx")
.with_post_process(PostProcessSteps::TRIANGULATE | PostProcessSteps::FLIP_UVS)
.import_file("model.fbx")?;
println!("Loaded {} meshes", scene.meshes().count());
§Architecture
This crate is built on top of asset-importer-sys
, which provides the raw
FFI bindings. The high-level API is designed to be:
- Safe: All unsafe operations are encapsulated
- Ergonomic: Builder patterns and method chaining
- Efficient: Zero-copy where possible
- Extensible: Support for custom I/O and callbacks
Re-exports§
pub use crate::error::Error;
pub use crate::error::Result;
pub use crate::importer::ImportBuilder;
pub use crate::importer::Importer;
pub use crate::importer::PropertyStore;
pub use crate::importer::PropertyValue;
pub use crate::importer::import_properties;
pub use crate::scene::MemoryInfo;
pub use crate::scene::Scene;
pub use crate::logging::LogLevel;
pub use crate::logging::LogStream;
Deprecated pub use crate::logging::Logger;
pub use crate::metadata::Metadata;
pub use crate::metadata::MetadataEntry;
pub use crate::metadata::MetadataType;
pub use crate::material::Material;
pub use crate::material::MaterialPropertyInfo;
pub use crate::material::PropertyTypeInfo;
pub use crate::material::TextureInfo;
pub use crate::material::TextureType;
pub use crate::material::material_keys;
pub use crate::texture::Texel;
pub use crate::texture::Texture;
pub use crate::texture::TextureData;
pub use crate::texture::TextureIterator;
pub use crate::aabb::AABB;
pub use crate::bone::Bone;
pub use crate::bone::BoneIterator;
pub use crate::bone::VertexWeight;
pub use crate::animation::Animation;
pub use crate::importer_desc::ImporterDesc;
pub use crate::importer_desc::ImporterFlags;
pub use crate::importer_desc::get_all_importer_descs;
pub use crate::importer_desc::get_importer_desc;
pub use asset_importer_sys as sys;
pub use crate::types::*;
Modules§
- aabb
- Axis-Aligned Bounding Box (AABB) support
- animation
- Animation data structures and utilities
- bone
- Bone and skeletal animation support
- camera
- Camera representation and utilities
- error
- Error handling for asset importer operations
- importer
- Scene importer functionality
- importer_
desc - Importer description functionality
- io
- Custom I/O system support
- light
- Light representation and utilities
- logging
- Logging system integration with Assimp
- material
- Material representation and properties
- math
- Thin wrappers over Assimp C math helpers (optional). These functions use the C API for operations on matrices, quaternions, and vectors, returning glam types for ergonomics. Prefer glam for general math; use these to match Assimp’s exact semantics.
- mesh
- Mesh representation and utilities
- metadata
- Metadata support for scenes and nodes
- node
- Scene node representation and hierarchy
- postprocess
- Post-processing steps for imported scenes
- progress
- Progress reporting for import/export operations
- scene
- Scene representation and management
- texture
- Texture and embedded texture support
- types
- Common types and type aliases used throughout the asset importer
- utils
- Utility functions and helpers for working with 3D assets
- version
- Version information
Functions§
- enable_
verbose_ logging - Enable verbose logging for debugging
- get_
import_ extensions - Get a list of all supported import file extensions
- is_
extension_ supported - Check if a file extension is supported for import