#stl #mesh #write #read-write #loader #binary #micro-stl

tinystl

A small library to read and write STL mesh files, inspired by MicroSTL

3 releases

0.0.3 Mar 15, 2023
0.0.2 Feb 27, 2023
0.0.1 Feb 27, 2023

#1329 in Encoding

Download history 3877/week @ 2024-11-15 4032/week @ 2024-11-22 4254/week @ 2024-11-29 6076/week @ 2024-12-06 4744/week @ 2024-12-13 2304/week @ 2024-12-20 1636/week @ 2024-12-27 5687/week @ 2025-01-03 6449/week @ 2025-01-10 5591/week @ 2025-01-17 4755/week @ 2025-01-24 5839/week @ 2025-01-31 4791/week @ 2025-02-07 4762/week @ 2025-02-14 5477/week @ 2025-02-21 5840/week @ 2025-02-28

22,236 downloads per month
Used in 7 crates (via re_renderer)

MIT license

75KB
425 lines

TinySTL - A small loader for STL files.

This project is heavily inspired by, and adapted from, cry-inc's microstl library. The goal is to provide a zero-dependency way to easily load and write STL files. It is assumed that all binary files are little endian.

Example

use tinystl::StlData;

let data = StlData::read_from_file("my_file.stl")?;
data.write_binary_file("my_binary_file.stl")?;

Features

Bytemuck

Derives Pod for Triangle.

Serde

Derives Serialize and Deserialize for all types.


lib.rs:

TinySTL - A small loader for STL files.

This project is heavily inspired by, and adapted from, cry-inc's microstl library. The goal is to provide a zero-dependency way to easily load and write STL files. It is assumed that all binary files are little endian.

Example

use tinystl::StlData;
let data = StlData::read_from_file("my_file.stl")?;
data.write_binary_file("my_binary_file.stl")?;

Features

Bytemuck

Derives Pod for Triangle.

Serde

Derives Serialize and Deserialize for all types.

Dependencies

~195KB