A high-performance Minecraft schematic parser and utility library
Project description
🧬 Nucleation
Nucleation is a high-performance Minecraft schematic engine written in Rust — with full support for Rust, WebAssembly/JavaScript, Python, and FFI-based integrations like PHP and C.
Built for performance, portability, and parity across ecosystems.
✨ Features
- ✅ Multi-format support:
.schematic,.litematic,.nbt, etc. - 🧠 Memory-safe Rust core with zero-copy deserialization
- 🌐 WASM module for browser + Node.js
- 🐍 Native Python bindings (
pip install nucleation) - ⚙️ C-compatible FFI for PHP, C, Go, etc.
- 🔄 Feature parity across all interfaces
- 📦 Binary builds for Linux, macOS, Windows (x86_64 + ARM64)
- 🧱 Seamless integration with Cubane
📦 Installation
🔧 Rust
cargo add nucleation
🌐 JavaScript / TypeScript (WASM)
npm install nucleation
🐍 Python
pip install nucleation
🧩 C / PHP / FFI
Download prebuilt .so / .dylib / .dll from Releases
or build locally using:
./build-ffi.sh
🚀 Quick Examples
Rust
use nucleation::UniversalSchematic;
let bytes = std::fs::read("example.litematic")?;
let mut schematic = UniversalSchematic::new("my_schematic");
schematic.load_from_data(&bytes)?;
println!("{:?}", schematic.get_info());
JavaScript (WASM)
import { SchematicParser } from "nucleation";
const bytes = await fetch("example.litematic").then(r => r.arrayBuffer());
const parser = new SchematicParser();
await parser.fromData(new Uint8Array(bytes));
console.log(parser.getDimensions());
Python
from nucleation import Schematic
with open("example.litematic", "rb") as f:
data = f.read()
schem = Schematic("my_schematic")
schem.load_from_bytes(data)
print(schem.get_info())
📖 → More in examples/python.md
FFI (PHP/C)
#include "nucleation.h"
SchematicHandle* handle = schematic_new("MySchem");
schematic_load_data(handle, data_ptr, data_len);
CSchematicInfo info;
schematic_get_info(handle, &info);
printf("Size: %dx%dx%d\n", info.width, info.height, info.depth);
schematic_free(handle);
🔧 Development
# Build the Rust core
cargo build --release
# Build WASM module
./build-wasm.sh
# Build Python bindings locally
maturin develop --features python
# Build FFI libs
./build-ffi.sh
📚 Submodules & Bindings
Rust
JavaScript/TypeScript
Python
FFI (C/PHP)
⚖️ License
Licensed under the GNU AGPL-3.0-only.
See LICENSE for full terms.
Made by @Nano112 with ❤️
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nucleation-0.1.71.tar.gz.
File metadata
- Download URL: nucleation-0.1.71.tar.gz
- Upload date:
- Size: 6.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7eee63ec259a368e10204ddeaf120691e011aef34b5fada4bbc1642d6423689d
|
|
| MD5 |
af3726ba8cfae4a46d5f269aa46a2c03
|
|
| BLAKE2b-256 |
6ba479ae31402f8b09c90852230115b4470d2934f2f064c357495d00a56d8aee
|
File details
Details for the file nucleation-0.1.71-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: nucleation-0.1.71-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 519.2 kB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68d55f607821ab119f8e5e7b56881b8ea5cf70f08e77d170a8e55a52a2dab3eb
|
|
| MD5 |
b0298a3d13b617dfbc6cf4ef52c0796a
|
|
| BLAKE2b-256 |
915d4684b8521e705f56036e4a26844a7f6820ca55901bcdc77269f20307905c
|