Skip to content

bplaat/crates

Repository files navigation

Bassie's Rust crates

A collection of minimal Rust crates and tools that I created for myself and others

Crates

Published libraries

These crates are published to crates.io and are more polished and documented

Libraries

These libraries are not published to crates.io and are more intended for personal use but can still be useful

Apps

Some desktop apps written with the bwebview library

2048 icon
2048
BassieLight icon
BassieLight
ManExplorer icon
ManExplorer
Navidrome icon
Navidrome
Pixel Font Editor icon
Pixel Font Editor
Sequel Explorer icon
Sequel Explorer

Tools / Websites

Various tools and websites, for the live deployed sites go to crates.bplaat.nl

  • baksteen A brick laying robot simulator
  • bob A simple build system for my projects, because I like the simplicity of Cargo
  • ccontinue A transpiler that translates an OOP-extension for the C programming language back to C
  • cargo-bundle A simple Cargo plugin the builds macOS app bundles
  • music-dl A tool that downloads complete albums with the correct metadata
  • plaatnotes A self-hosted note taking web app with rich markdown support

Replacement libraries

These libraries are created as minimal / smaller replacements for common used crates

Getting Started

  • Open a posix shell environment when you are on Windows (e.g. Git Bash)

  • Install Rust, Node.js, ShellCheck and clang-format

  • Install Rust nightly toolchain, cargo-binstall, cargo-deny and cargo-nextest:

    rustup toolchain add nightly --component rust-src --component rustfmt
    curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
    cargo binstall -y --locked cargo-deny cargo-nextest
  • Run checks, or run an example:

    ./meta.sh check
    cargo run --bin example-persons-api
    cargo run --bin example-todo-app

Additional tools

  • For coverage reports, install the llvm-tools and cargo-llvm-cov tool:

    rustup component add llvm-tools
    cargo binstall -y --locked cargo-llvm-cov
    ./meta.sh coverage
  • To build pages, install a wasm target and the wasm-bindgen-cli tool:

    rustup target add wasm32-unknown-unknown
    cargo binstall -y --locked wasm-bindgen-cli --version 0.2.104
    ./meta.sh build-pages
  • To build macOS app bundles, only on macOS, install targets:

    rustup target add aarch64-apple-darwin x86_64-apple-darwin
    ./meta.sh build-bundle
  • To build and install bins and GUI applications to your system:

    ./meta.sh install

Goals

This project is driven by three main goals:

1. A self-written minimal crates collection for backend software

Rather than pulling in large, general-purpose dependencies, this repo grows a curated set of small, focused libraries that cover exactly what is needed - nothing more. This includes an HTTP/1.1 server, a router, a SQLite wrapper, validation, password hashing, UUID generation, and more. Many of these are intentional minimal replacements for well-known crates on crates.io, rewritten from scratch to be lean, auditable, and free of transitive dependencies.

2. A minimal Electron/Tauri-like desktop platform

bwebview is a cross-platform native webview library that lets you ship desktop applications using web technologies, without the weight of bundling a full browser engine. It uses the system-native webview on each platform (WebKit on macOS/iOS, WebKitGTK on Linux, WebView2 on Windows) and exposes a small, clean Rust API. The desktop apps in this repo: a 2048 game, a SQLite viewer, a pixel font editor, a man page browser, serve as real-world validation of this platform.

3. Tools and a custom build system for complex multi-language projects

Building projects that span multiple languages and artifact types (Rust, JavaScript, WASM, native bundles) requires coordination that general-purpose build systems handle poorly. bob is a minimal build system inspired by Cargo's simplicity, designed to describe and orchestrate such projects cleanly. cargo-bundle handles macOS .app bundle packaging from within the Cargo ecosystem. Together with meta.sh these tools keep the build pipeline simple, scriptable, and easy to follow.

Repo organization

This repo is organized as a monorepo with Cargo as the single build system. Monorepos work best when one build system acts as the central organization point for all submodules, and Cargo fills that role here perfectly.

All Rust code lives in a single Cargo workspace that builds everything together. Some crates extend this with custom build steps that invoke other tools like npm or vite, but those are orchestrated from within Cargo build scripts.

The meta.sh script contains all top-level tasks and is used both from the command line and in CI. The only exception is the bob/examples directory, which intentionally uses a different build system as a showcase for the bob build tool itself.

License

Copyright © 2021-2026 Bastiaan van der Plaat

Licensed under the MIT license.

About

A collection of minimal Rust crates and tools that I created for myself and others

Topics

Resources

License

Stars

Watchers

Forks

Contributors