gltf

A Rust crate for loading glTF 2.0 3D scenes, models, and assets

Library
Cargo
v1.4.1
638stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
52/100Fair
Development Activity16
Maintenance20
Community84
Maturity60
Momentum28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
76/100Good
Architecture84
Code Quality82
Innovation70
Learning Curve68

gltf is a Rust crate for loading glTF 2.0, the Khronos file format designed for efficient transmission of 3D assets. It parses scenes, nodes, meshes, materials, animations, skins, cameras, and textures into a strongly typed object graph you can traverse from your own rendering or tooling code.

The crate supports both the JSON .gltf and binary .glb container formats, optional extras and names handling, and a range of ratified glTF extensions such as KHR_lights_punctual and KHR_texture_transform. Widely used across the Rust graphics ecosystem, it is distributed under the Apache-2.0 license.

What You Get

  • A strongly typed reader for the full glTF 2.0 object model
  • Support for both JSON .gltf and binary .glb containers
  • Accessors and buffer views for reading vertex, index, and animation data
  • Optional handling of extras, names, and popular KHR extensions

Common Use Cases

  • Importing 3D models into a Rust game engine or renderer
  • Building asset-processing tools that inspect or convert glTF files
  • Extracting mesh geometry, materials, and animations for rendering
  • Loading PBR scenes for visualization or simulation applications

Under The Hood

Architecture - gltf wraps a lower-level gltf-json crate that mirrors the glTF schema, layering ergonomic wrapper types (Document, Scene, Node, Mesh, Accessor) that borrow from the underlying JSON and imported buffer/image data. An import entry point resolves external and embedded buffers into ready-to-read byte slices.

Tech Stack - Pure Rust built on serde/serde_json for schema deserialization, with feature flags gating extras, names, image import (via the image crate), and individual glTF extensions. Requires rustc 1.61+ and is published as the gltf crate.

Code Quality - A mature, well-maintained project with 68 contributors, extensive docs.rs documentation, examples, and a clear extension support matrix; feature-gated compilation keeps the default build lean.

API Design - The API models the glTF spec closely with iterator-based traversal of scenes and nodes and typed accessors, offering a discoverable, well-documented surface that mirrors the format’s own structure.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search