Buup - The Text Utility Belt
Buup is a versatile text transformation toolkit that provides a dependency-free core library and CLI for common text manipulations like encoding/decoding, formatting, cryptography, (coming soon compression/decompression), and more written in pure dependency-free Rust.
It is designed to be a simple, lightweight, open, secure, provably fast and easy to integrate.
Drop-in replacement for all of those dodgy online text transformation tools you've ever used in the past except the batteries are included (and they are all in pure Rust).
It includes a web application which is of course written in pure Rust (WASM via Dioxus) as a separate workspace member.
Key Features
- Zero Dependencies: The core
buuplibrary and its CLI implement all transformations without external dependencies - Multiple Interfaces: CLI for terminal workflows and Web UI for interactive use
- Extensible Design: Easy to add new transformers by implementing the
Transformtrait - Strong Typing: Full type safety with comprehensive error handling
- Thread Safety: All transformers are designed to be safely used concurrently
- Performance: Optimized for speed and memory usage
Ways to Use Buup
Buup offers three distinct ways to transform your text:
1. Web Application
A modern, responsive web application for interactive text transformations proudly built with Dioxus.
| Dark Mode | Light Mode |
|---|---|
From source:
# Serve the web UI (requires Dioxus CLI)
Build for production:
2. Command Line Interface
Zero-dependency CLI for quick transformations in your terminal workflows.
# Installation
# List available transformers
# Examples
|
3. Rust Library
Integrate Buup's transformers directly into your Rust applications.
# Add to your project
use ;
// Option 1: Use a specific transformer struct
let encoded = Base64Encode.transform.unwrap;
println!; // SGVsbG8sIExpYnJhcnkh
// Option 2: Look up a transformer by its ID
let transformer = transformer_from_id.unwrap;
let decoded = transformer.transform.unwrap;
println!; // Hello, Library!
Available Transformers
The following transformers are currently available in Buup:
)
)
)
)
)
)
)
)
)
|
Update README.md with buup list
Contributing
Contributions are welcome! When adding new transformers or modifying code, please ensure:
- Zero external dependencies in the core
buuplibrary - Comprehensive tests covering functionality and edge cases
- Clear error handling using
TransformError - Run
cargo test --workspaceandcargo clippy --workspace -- -D warnings
Creating Custom Transformers
Basic Structure
To create a custom transformer:
- Create a new struct that implements the
Transformtrait - Add the struct to the registry in
lib.rs
Step 1: Example Implementation
Here's a simple example of a custom transformer that reverses text:
use ;
/// Text Reverse transformer
;
Step 2: Add to Registry
In lib.rs, add your transformer to the register_builtin_transformers function:
Step 3: Export Your Transformer (Optional)
If your transformer will be used directly, add it to the exports in transformers/mod.rs:
// src/transformers/mod.rs
// ... other mods ...
// Your new module
pub use Base64Decode;
// ... other uses ...
pub use MyNewTransformer; // Your new transformer
Step 4: Add Inverse Support (Optional)
If your transformer has an inverse operation, update the inverse_transformer function in lib.rs:
Tips for Creating Good Transformers
- Follow the naming convention of existing transformers
- Provide clear and concise descriptions
- Make sure your transformer is thread-safe (impl Sync+Send)
- Consider implementing pairs of transformers for inverse operations
- Add comprehensive tests for your transformer