Community packages for the BMB programming language, managed by gotgan.
This repository contains reusable community packages that extend BMB's capabilities beyond the standard library.
NOT included here:
- Core language primitives (in
stdlib/core/) - Built-in types and operations (part of compiler)
- Language-level features (ownership, contracts, etc.)
Included here:
- Utility libraries (math, time, formatting)
- Data format parsers (JSON, TOML, YAML)
- System utilities (fs, process, network)
- Development tools (testing, logging)
- Domain-specific libraries
| Package | Description | Version | Status |
|---|---|---|---|
| bmb-math | Mathematical functions and constants | 0.1.0 | Stable |
| bmb-rand | Pseudo-random number generation | 0.1.0 | Stable |
| bmb-log | Structured logging utilities | 0.1.0 | Stable |
| bmb-testing | Testing framework | 0.1.0 | Stable |
| bmb-fmt | String formatting utilities | 0.1.0 | Stable |
| bmb-time | Time and duration utilities | 0.1.0 | Stable |
| bmb-json | JSON parsing and serialization | 0.1.0 | Stable |
| bmb-regex | Regular expression matching | 0.1.0 | Stable |
| bmb-http | HTTP client and server utilities | 0.1.0 | Stable |
| bmb-fs | File system path utilities | 0.1.0 | Stable |
| bmb-semver | Semantic versioning parsing | 0.1.0 | Stable |
| bmb-toml | TOML parsing and validation | 0.1.0 | Stable |
# Add a package to your project
gotgan add bmb-math
# Or specify in gotgan.toml
[dependencies]
bmb-math = "0.1.0"
bmb-semver = "^0.1.0"Each package follows the standard gotgan layout:
packages/
└── bmb-<name>/
├── gotgan.toml # Package manifest
└── src/
└── lib.bmb # Library source
- Create a new package directory under
packages/ - Add
gotgan.tomlwith package metadata - Implement library in
src/lib.bmb - Submit a pull request
- Contracts Required: All public functions MUST have
pre/postconditions - Pure Functions Preferred: Mark pure functions with
@pureattribute - Termination Proofs: Recursive functions should have
@decreasesannotations - No Side Effects: Avoid mutable state where possible
- Functions:
snake_case(e.g.,parse_version,get_major) - Types:
PascalCase(e.g.,Version,Constraint) - Constants:
SCREAMING_SNAKEor functions returning values - Packages:
bmb-<name>(lowercase with hyphens)
- Inline comments with
--for sections and complex logic - Section headers with
-- ============separators - Function purpose in comment above signature
- No separate doc files required (contracts are documentation)
| Category | Prefix | Examples |
|---|---|---|
| Core utilities | bmb- |
bmb-math, bmb-fmt |
| Data formats | bmb- |
bmb-json, bmb-toml |
| System | bmb- |
bmb-fs, bmb-http |
| Development | bmb- |
bmb-testing, bmb-log |
[package]
name = "bmb-<name>"
version = "0.1.0"
description = "Brief description of the package"
authors = ["Your Name <[email protected]>"]
license = "MIT"
repository = "https://github.com/lang-bmb/gotgan-packages"
[dependencies]
# List dependencies herePull requests are evaluated on:
- Correctness: Contracts verified by SMT solver
- Completeness: API covers common use cases
- Performance: No unnecessary allocations or copies
- Reusability: Generic design, no hard-coded values
- Consistency: Follows BMB idioms and existing patterns
Packages follow Semantic Versioning:
0.x.y: Development phase, API may change1.0.0+: Stable API, breaking changes increment major- Use
bmb-semverpackage for version operations
See MODULE_ROADMAP.md for the comprehensive development plan including:
- Package-to-benchmark mapping
- Feature gap analysis (f64, collections, etc.)
- Phased development timeline
- API specifications for planned enhancements
These packages are extracted from or designed to support gotgan (the BMB package manager). Core gotgan functionality like semver parsing, TOML handling, and archive management becomes reusable packages here.
MIT - See individual packages for specific license information.