Skip to main content

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.


Crates.io npm PyPI


✨ 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());

📖 → More in examples/rust.md


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());

📖 → More in examples/wasm.md


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);

📖 → More in examples/ffi.md


🔧 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

nucleation-0.1.20.tar.gz (3.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nucleation-0.1.20-cp312-cp312-macosx_11_0_arm64.whl (449.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

Details for the file nucleation-0.1.20.tar.gz.

File metadata

  • Download URL: nucleation-0.1.20.tar.gz
  • Upload date:
  • Size: 3.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.7

File hashes

Hashes for nucleation-0.1.20.tar.gz
Algorithm Hash digest
SHA256 b740d0de6763695ac5c67b1e60772ce9feac01088392e42a67ae68904e1a9308
MD5 f35555a0bcdbc91b122d1c5623201c2b
BLAKE2b-256 06a070196f36fd6f2e39ed9143a1b00f521a0ccda64d3223d5e1003c6d038d35

See more details on using hashes here.

File details

Details for the file nucleation-0.1.20-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nucleation-0.1.20-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 71ee3e6bf09e3098bc03145a3447932615f56c47149ac935534c9eea3ad07a9b
MD5 4326d405d63b928e79bd080242098064
BLAKE2b-256 38e5a4134d9ba2eec9781c829c3c0c458eb0d39736e362d746be66bb9f21d62d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page