| Crates.io | asset-importer-rs-core |
| lib.rs | asset-importer-rs-core |
| version | 0.3.0 |
| created_at | 2025-05-27 23:42:11.044569+00 |
| updated_at | 2025-07-28 23:52:33.959268+00 |
| description | Core module for asset-importer-rs |
| homepage | |
| repository | https://github.com/crazyjackel/asset-importer-rs |
| max_upload_size | |
| id | 1692103 |
| size | 25,452 |

asset-importer-rs-core is the foundational crate of the asset-importer-rs project, providing the core functionality for importing and exporting 3D assets. Inspired by the Assimp library, this crate establishes the fundamental building blocks that all format-specific importers and exporters rely upon.
This crate provides the essential infrastructure for:



Add the following to your Cargo.toml:
[dependencies]
asset-importer-rs-core = "0.2.0"
# Or for development from source:
asset-importer-rs-core = { path = "../path/to/asset-importer-rs-core" }

Basic usage example:
use asset_importer_rs_core::{
AiImporter,
AiImporterInfo
};
use std::path::Path;
// Define a custom importer
struct MyImporter;
impl AiImporterInfo for MyImporter {
fn info(&self) -> asset_importer_rs_core::AiImporterDesc {
// Implementation details...
unimplemented!()
}
}
impl AiImporter for MyImporter {
type Error = AiReadError;
fn can_read_dyn(&self, path: &Path, loader: &dyn Fn(&Path) -> std::io::Result>) -> bool {
// Check if this importer can handle the file
unimplemented!()
}
fn read_file_dyn(&self, path: &Path, loader: &dyn Fn(&Path) -> std::io::Result>) -> Result {
// Import the file
unimplemented!()
}
}
Using post-processing steps:
use asset_importer_rs_core::AiPostProcessSteps;
use enumflags2::BitFlags;
// Define post-processing operations
let post_process_steps = BitFlags::from(
AiPostProcessSteps::Triangulate |
AiPostProcessSteps::GenNormals |
AiPostProcessSteps::CalcTangentSpaces
);

The core crate provides the fundamental building blocks for asset import/export operations. It establishes the interfaces and abstractions that all format-specific implementations must follow, ensuring consistency and interoperability across the entire asset-importer-rs ecosystem.


This project is part of the asset-importer-rs workspace and follows its licensing terms. See the main project LICENSE file for details.
Copyright (c) 2024 Jackson Levitt