Skip to main content
Bomboni is available on crates.io and can be added to your project like any other Rust dependency.

Adding to your project

Add Bomboni to your Cargo.toml file:
Cargo.toml
[dependencies]
bomboni = "0.2.1"
This gives you access to the core utilities including bomboni_common (identifiers and datetime) and bomboni_macros (helper macros).

Feature flags

Bomboni uses Cargo feature flags to enable optional functionality. This keeps your dependencies minimal and compile times fast.

Core features

Enables API request parsing and validation utilities following Google AIP standards.Includes:
  • Filter expression parsing (AIP-160 compliant)
  • Query ordering and pagination
  • List and search query builders
  • Schema validation
Cargo.toml
[dependencies]
bomboni = { version = "0.2.1", features = ["request"] }
Enables derive macros for request parsing and WASM bindings.Automatically enables:
  • bomboni_request/derive for Parse derive macro
  • bomboni_wasm/derive for Wasm derive macro
Cargo.toml
[dependencies]
bomboni = { version = "0.2.1", features = ["derive", "request"] }
Enables Protocol Buffer compilation utilities with prost.
Cargo.toml
[dependencies]
bomboni = { version = "0.2.1", features = ["prost"] }
Enables enhanced implementations of Google’s well-known protobuf types.Automatically enables the prost feature.
Cargo.toml
[dependencies]
bomboni = { version = "0.2.1", features = ["proto"] }
Enables Handlebars template rendering with custom helpers.
Cargo.toml
[dependencies]
bomboni = { version = "0.2.1", features = ["template"] }
Enables file system utilities for recursive operations.
Cargo.toml
[dependencies]
bomboni = { version = "0.2.1", features = ["fs"] }

Serialization and async

Enables serde serialization and deserialization for Bomboni types.
Cargo.toml
[dependencies]
bomboni = { version = "0.2.1", features = ["serde"] }
Enables async APIs using the tokio runtime.
Cargo.toml
[dependencies]
bomboni = { version = "0.2.1", features = ["tokio"] }
Enables conversion utilities between Bomboni’s UtcDateTime and chrono’s datetime types.
Cargo.toml
[dependencies]
bomboni = { version = "0.2.1", features = ["chrono"] }

gRPC integration

Enables integration with the tonic gRPC library.Provides conversions between Bomboni and tonic types, including status codes and error handling.
Cargo.toml
[dependencies]
bomboni = { version = "0.2.1", features = ["tonic", "proto", "request"] }

Database support

Enables PostgreSQL type conversions and SQL generation.Provides:
  • Type conversions for IDs and datetime
  • SQL filter generation for PostgreSQL dialect
Cargo.toml
[dependencies]
bomboni = { version = "0.2.1", features = ["postgres", "request"] }
Enables MySQL type conversions and SQL generation.Provides:
  • Type conversions for IDs and datetime
  • SQL filter generation for MySQL dialect
Cargo.toml
[dependencies]
bomboni = { version = "0.2.1", features = ["mysql", "request"] }

WebAssembly support

Enables WebAssembly support and TypeScript declaration generation.Automatically enables the serde feature for JavaScript interop.
Cargo.toml
[dependencies]
bomboni = { version = "0.2.1", features = ["wasm"] }
Enables JavaScript-specific type mappings and conversions.Use in combination with wasm for better JavaScript integration.
Cargo.toml
[dependencies]
bomboni = { version = "0.2.1", features = ["wasm", "js"] }

Common combinations

Here are some recommended feature combinations for different use cases:
[dependencies]
bomboni = { version = "0.2.1", features = [
  "request",
  "derive",
  "proto",
  "tonic",
  "serde",
  "tokio",
  "postgres", # or "mysql"
] }

Using individual crates

You can also depend on individual Bomboni crates directly:
Cargo.toml
[dependencies]
bomboni_common = "0.2.1"
bomboni_request = { version = "0.2.1", features = ["derive"] }
bomboni_proto = "0.2.1"
This approach gives you more fine-grained control but requires managing dependencies between crates yourself.
When using individual crates, ensure version compatibility. All Bomboni crates in the same project should use the same version number.

Version compatibility

Bomboni follows semantic versioning:
  • 0.2.x - Current version, API may change
  • Minimum Rust version - Rust 2024 edition (Rust 1.83+)
Bomboni uses the 2024 edition of Rust. Make sure your project uses edition = "2024" in Cargo.toml or is compatible with 2024 edition dependencies.

Next steps

Now that you have Bomboni installed, learn how to use it:

Quickstart guide

Build your first application with Bomboni

Build docs developers (and LLMs) love