Skip to content

Schem-at/Nucleation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧬 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 ❀️

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •