1 unstable release
Uses new Rust 2024
| 0.1.0 | Sep 15, 2025 |
|---|
#2080 in Configuration
115KB
2.5K
SLoC
RESL
A modern configuration and serialization language with variables, expressions, and dynamic runtime evaluation.
RESL = Runtime Evaluated Serialization Language
Documentation
- 📚 Complete Documentation - Language guide, syntax, and examples
- 📖 Rust API Documentation - Crate documentation and API reference
License
MIT OR Apache-2.0
lib.rs:
RESL
A modern configuration and serialization language with variables, expressions, and dynamic runtime evaluation.
RESL = Runtime Evaluated Serialization Language
RESL enables dynamic configuration files with variables, expressions, conditionals, and computed values for flexible configuration management.
Quick Start
use resl::evaluate;
// Simple evaluation
let result = evaluate("5 + 3").unwrap();
println!("{}", result); // Outputs: 8
// Configuration with variables and logic
let config = r#"
{
port = 8080;
host = "localhost";
debug = true;
url = concat("http://", host, ":", port);
env = ? debug : "development" | "production";
["url": url, "environment": env]
}
"#;
let result = evaluate(config).unwrap();
Key Features
- Variables & References: Define variables and reference them directly by name
- Function Declaration & Calls: Define and call functions with parameter passing
- Binary Operations: Perform arithmetic, logical, and comparison operations
- Conditional Logic: Use ternary operators
? condition : then | else - Rich Data Types: Support for strings, numbers, booleans, lists, and maps
- Block Expressions: Group statements and computations in
{}blocks - Array/Object Access: Index into collections with
[key]syntax and range slicing - Flexible Structure: Top-level can be any expression, not just objects
Installation
Add RESL to your Cargo.toml:
[dependencies]
resl = "0.1"
Documentation
For comprehensive documentation, examples, and guides, visit: https://decipher3114.github.io/resl
The documentation includes:
- Complete syntax guide with examples
- Language bindings for C/C++ and other languages
- CLI usage and tools
- Best practices and patterns
- Comparison with other configuration formats
Dependencies
~2.4–3.5MB
~76K SLoC