About this project

## What this repository is `flowscripter/template-bun-rust-library` is described in its README as a "Project template for a Rust library with Bun FFI bindings". It is intended as a starting point rather than an end-user application: developers scaffold a new project from it and then replace the sample code with their own Rust implementation and TypeScript bindings. ## Scaffolding usage The README documents creating a new Bun project directly from the template: `bun create @flowscripter/template-bun-rust-library` ## Consuming the generated module The published module is added with `bun add @flowscripter/template-bun-rust-library`, and the README's example imports a single exported function and invokes it: ```typescript import { world } from "@flowscripter/template-bun-rust-library"; world(); ``` This demonstrates the intended shape of the template: a Rust library surfaced to TypeScript consumers through Bun's FFI support, with `index.ts` as the TypeScript entry point. ## Development workflow The README lists the following commands: - `bun install` — install dependencies. - `bun run build` — build output; according to the README it produces `dist/` for Node.js and TypeScript consumers, while Bun uses the raw source directly. - `cargo test` — run the Rust tests. - `cargo build --release && bun test` — build the Rust release artifacts and run the Bun test suite. - `bunx oxfmt` — format. - `cargo fmt && bunx oxlint index.ts src/ tests/` — lint Rust and TypeScript sources. - `bunx typedoc index.ts` — generate HTML API documentation. ## Documentation The README includes a sample Mermaid class diagram (`Foo <|-- Bar`) to verify Markdown rendering, and links to auto-generated API documentation hosted on GitHub Pages. Additional documentation links include Rust docs on docs.rs. ## Project metadata The repository carries badges for release version, build status, API docs, Rust docs, coverage and an MIT license. License is stated as MIT © Flowscripter. ## Notes for prospective users Because this is a template, the `world()` export and the example diagram are placeholders. The practical value is the wiring it provides between a Rust crate and a Bun/TypeScript package, together with the accompanying build, test, lint, formatting and documentation commands and CI configuration.