13 breaking releases
| new 0.16.0 | Jan 21, 2026 |
|---|---|
| 0.15.0 | Dec 19, 2025 |
| 0.14.0 | Nov 24, 2025 |
#405 in #optimization
421 downloads per month
Used in strs_tools
76KB
1.5K
SLoC
strs_tools_meta
Procedural macros for compile-time string optimizations.
Overview
strs_tools_meta provides procedural macros that enable compile-time optimizations for string operations. This is the proc-macro companion crate for strs_tools.
Important: This crate should not be used directly. Use the strs_tools crate which re-exports this functionality.
Installation
Add to your Cargo.toml:
[dependencies]
strs_tools = { version = "*" }
Features
| Feature | Default | Description |
|---|---|---|
enabled |
✓ | Enable the crate |
full |
- | All features |
optimize_split |
✓ | Enable split optimization |
optimize_match |
✓ | Enable match optimization |
Usage
Optimized String Splitting
use strs_tools::optimize_split;
// Pattern compiled at build time
let parts = optimize_split!( "hello,world", "," );
Optimized String Matching
use strs_tools::optimize_match;
// Match patterns compiled at build time
let result = optimize_match!( input, "pattern1" | "pattern2" );
Documentation
- Specification - Complete technical specification
- API Documentation - Full API reference
Testing
# Run all tests
cargo nextest run --all-features
# With workspace context
w3 .test l::3
License
Licensed under MIT license. See license file for details.
Dependencies
~0–310KB