Source:
README.mdโ this page is rendered directly from the file in the repository. Edit it there.
Slicer Engine โ
๐ Try the online slicer โ no install, no account, works right now.
Slice your 3D models instantly โ in your browser, on your desktop, or on your own server. Your workflow, your choice.
Drop in an STL, OBJ, or 3MF and get print-ready G-code in seconds. One engine, three ways to run it:
| Where it runs | Setup | |
|---|---|---|
| ๐ Web | Fully in your browser โ nothing installed | None โ just open the link |
| ๐ฅ๏ธ Desktop | Native app, runs entirely on your machine | Download & run |
| โ๏ธ Self-hosted | Host it yourself, share with your team | cargo run -- serve |
Every mode uses the same slicing engine, so results are identical regardless of how you run it. In the browser, your files never leave your machine.
๐ Full documentation: https://slicer.maxscopp.de/docs/ โ architecture, module guides, and contributor docs.
Prerequisites โ
Before building or running, ensure you have:
Required โ
- Rust 1.70+ via rustup โ the Homebrew
rustpackage is not supported; it ships without thewasm32-unknown-unknownstandard library and can't add targets. If you have it installed, runbrew uninstall rustfirst, then install rustup. - Node.js 20+ and pnpm 9+ โ Node, then
npm install -g pnpm
For WASM builds (self-hosted UI, browser slicer, desktop) โ
All three modes need the WASM scene bindings. Add the target and install a matching wasm-bindgen-cli:
rustup target add wasm32-unknown-unknown
# Match the wasm-bindgen version pinned in Cargo.lock โ mismatched CLI
# versions silently produce broken bindings.
cargo install wasm-bindgen-cli --version "$(grep -A1 '^name = "wasm-bindgen"$' Cargo.lock | tail -1 | cut -d'"' -f2)" --lockedOnly needed if you build the standalone in-browser bundle yourself:
cargo install wasm-pack. Thepnpm hydratescripts do not use it.
For desktop app builds โ
Install Tauri CLI (choose one):
cargo install tauri-cli --version "^2"
# OR: pnpm add -g @tauri-apps/cliOptional โ
- C++ toolchain (clang++ or MSVC) โ needed only for full WASM builds with polygon clipping support
- Linux:
sudo apt install build-essential clang - macOS:
xcode-select --install(Xcode Command Line Tools) - Windows: Visual Studio or Build Tools
- Linux:
Quick Start โ
# Slice an STL to G-code
cargo run -- slice --input model.stl --output output.gcode
# Inspect or edit persisted settings
cargo run -- settings show
cargo run -- settings set layer_height 0.15To run the WebSocket + UI server (cargo run -- serve), see First-time setup below โ the UI must be built before the server can serve it.
First-time setup (self-hosted UI) โ
After cloning, run these once in order. Skipping any step means the next one fails with confusing errors.
# 1. Install deps (Rust + Node prerequisites above must already be in place)
pnpm install
# 2. Build WASM scene bindings + generate JSON schemas + TS types
# Populates ui/src/generated/ โ without this, `pnpm ui:build` fails with
# "Cannot find module '../../generated/scene-wasm/scene_engine'".
pnpm run hydrate
# 3. Build the Angular UI
# Produces ui/dist/slicer-ui/browser โ without this, `cargo run -- serve`
# fails with "UI directory not found: ./ui/dist/slicer-ui/browser".
pnpm run ui:build
# 4. Start the server (serves the UI at http://localhost:5201/)
cargo run -- serveFor iterative UI work, use the dev-server flow in Self-hosted web UI below (skips step 3, hot-reloads Angular).
Architecture at a glance โ
The same engine runs in three different environments โ on a server, compiled into the browser, and bundled into the desktop app โ so slicing results are always identical regardless of where you run it.
The UI selects its runtime mode at startup:
| Mode | Where slicing happens | When |
|---|---|---|
cloud | On your server | Default web build |
web | In your browser | web-slicer build |
native | On your desktop | Desktop app |
See Scene Engine and Slicing Pipeline for the contract.
Configuration โ
Slicer Engine is configured via slicer.toml. Resolution order:
- CLI flags (per invocation, never persisted)
- Project config โ
./slicer.tomlin the working directory - User config โ platform path (e.g.
~/.config/slicer-engine/slicer.toml) - Built-in defaults
[machine]
nozzle_diameter = 0.4
build_volume_x = 220.0
[slicing]
layer_height = 0.2
wall_count = 3
infill_density = 0.20
[server]
port = 5201Manage it from the CLI:
slicer-engine config show
slicer-engine config set slicing.layer_height 0.15
slicer-engine slice --input model.stl --config ./slicer.tomlFull reference โ Settings ยท Config (TOML) ยท CLI.
Self-hosted web UI โ
Production flow (server serves the built UI on a single port):
pnpm run hydrate # once (or when Rust bindings/schemas change)
pnpm run ui:build # once (or after UI changes)
cargo run --release -- serve # http://localhost:5201/Dev flow (Angular hot-reload, backend runs separately โ both must be running):
pnpm run hydrate # once (or when Rust bindings/schemas change)
pnpm run ui:dev # Angular dev server โ http://localhost:4200
cargo run -- serve # WebSocket/HTTP server โ http://localhost:5201The UI sends slicing jobs to the local server. Scene management runs in the browser for instant feedback.
Browser slicer (no server needed) โ
Live demo: https://slicer.maxscopp.de/ โ slice in your browser, no backend required.
The full slicing pipeline runs in-browser. Building this locally requires a wasm-capable C++ toolchain (clang++) for the polygon clipping library.
# Build the full WASM bundle (scene + slicer)
pnpm run hydrate:web-slicer
# Dev server โ no backend required
pnpm run ui:dev:web-slicer # http://localhost:4200
# Production build
pnpm run ui:build:web-slicerDesktop app โ
Bundles the UI and the full slicing engine into a native desktop application. No server required.
# Prerequisites: install Tauri CLI
cargo install tauri-cli --version "^2"
# or: pnpm add -g @tauri-apps/cli
# Dev mode (hot-reloads Angular, rebuilds Rust on change)
pnpm run desktop:dev
# Production build (outputs a platform installer)
pnpm run desktop:buildThe desktop app automatically uses the bundled native engine for slicing, giving you full offline capability and the best performance. Scene management is shared with the browser UI, so the experience is identical.
Building โ
Native (your host platform) โ
cargo build --release # Single command โ that's itCross-platform โ
cargo build --release --target x86_64-pc-windows-msvc # Windows
cargo build --release --target x86_64-apple-darwin # macOS Intel
cargo build --release --target aarch64-apple-darwin # macOS ARMWebAssembly (browser slicer) โ
Requires: rustup target add wasm32-unknown-unknown and cargo install wasm-pack
wasm-pack build --target web --releaseOr use the pnpm script (which handles schema generation too):
pnpm run hydrate # Scene + type bindings
pnpm run hydrate:web-slicer # Full WASM slicer (includes polygon clipping)Using Makefile (Linux/macOS) โ
make build-release build-windows build-macos build-wasmTroubleshooting Setup โ
cargo run -- serve fails with UI directory not found: ./ui/dist/slicer-ui/browser? Build the UI first: pnpm run hydrate && pnpm run ui:build. See First-time setup.
pnpm ui:build fails with Cannot find module '../../generated/scene-wasm/scene_engine' (or .../slicer-engine-ws-*-message-v1)? You skipped pnpm run hydrate. Run it, then retry the build.
wasm32-unknown-unknown target not found / error[E0463]: can't find crate for 'core'? Either the target isn't installed (rustup target add wasm32-unknown-unknown) or you're on Homebrew Rust, which can't add targets. Run brew uninstall rust and install rustup.
wasm-bindgen command not found? Install the CLI at the exact version pinned in Cargo.lock (mismatched versions produce silently broken bindings):
cargo install wasm-bindgen-cli --version "$(grep -A1 '^name = "wasm-bindgen"$' Cargo.lock | tail -1 | cut -d'"' -f2)" --lockedwasm-pack command not found? Only needed for the standalone wasm-pack build invocation โ the pnpm hydrate scripts don't use it. If you actually need it: cargo install wasm-pack.
pnpm hydrate fails with C++ compilation errors? Install the C++ toolchain for your platform (see Prerequisites above), then retry.
Development โ
cargo build # fast iteration (debug)
cargo test
cargo fmt && cargo clippy --all-targets --all-features -- -D warnings
pnpm --filter slicer-engine-docs docs:dev # live docs site
sea-orm-cli migrate generate "my_migration" -d src/db # scaffold DB migrationSee CONTRIBUTING.md for workflow, AGENTS.md for AI-agent guidance, and ARCHITECTURE.md for the long-form architecture overview (also rendered on the docs site).
References โ
RepRap G-code Wiki ยท Arachne Paper ยท Clipper2 ยท Marlin G-code ยท Klipper G-code ยท Tauri
Implementation notes โ
Built on proven approaches from established slicers, but written from scratch in Rust. AI tools assist with development and problem-solving; all AI-generated code is reviewed and approved by human maintainers before merge.
License โ
All rights reserved until an official license is decided. No use, reproduction, modification, or distribution permitted without written authorization. TBD.
Support โ
Issues ยท Discussions ยท Contributing ยท Documentation site