| Crates.io | akari |
| lib.rs | akari |
| version | 0.2.7-rc1 |
| created_at | 2025-03-13 00:08:05.572587+00 |
| updated_at | 2025-11-07 01:55:29.572714+00 |
| description | Dynamic & Weakly Typed Programming Powered by Rust |
| homepage | https://fds.rs/akari/ |
| repository | https://github.com/Field-of-Dreams-Studio/akari |
| max_upload_size | |
| id | 1590333 |
| size | 371,813 |
cargo install akari
| Component | Feature Flag | Description |
|---|---|---|
| Akari Value | dynamic & object_macro |
JSON implementation with macros and file I/O |
| Extensions | extension |
Type/string-based storage for middleware/app logic |
| Templating | template |
HTML template engine with inheritance and caching |
Key Features:
// Create objects
use akari::object;
let data = object!({
number: 3,
nested: {
list: [1, 2, 3]
}
});
// Parse/emit JSON
let obj = Value::from_json(r#"{"key":"value"}"#)?;
obj.into_jsonf("data.json")?; // Write to file
Important Methods:
to_string(): Debug representationstring(): Extract string valueinto_json(): Serialize to JSON stringis_dict()/is_list(): Type checksEnable
object_macrofeature forobject!syntax
Type-Based Storage (Params):
let mut params = Params::new();
params.set(42u8); // Store by type
params.get_mut::<u8>().map(|n| *n += 1);
String-Based Storage (Locals):
let mut locals = Locals::new();
locals.set("counter", 0i32); // Store by key
locals.keys(); // ["counter"]
Cloneable Variants:
ParamsClone: Cloneable type storageLocalsClone: Cloneable key-value storagecombine() (no overwrite), merge() (overwrite)Bridge Storage Types:
locals.export_param(¶ms, "exported_value");
Render Templates:
akari render_string "-[output var]-" var=42 # Output: 42
Key Features:
insertSee Starberry Examples for usage patterns
Style Guidelines:
Refer to STYLE.md for coding standards
Update Log Highlights:
| Version | Key Changes |
|---|---|
| 0.2.7 | Trait based design for parser |
| 0.2.5 | Safer into_json, operator implementations |
| 0.2.4 | Added is_<type>() and contains() methods |
| 0.2.3 | Renamed types, separated value/template modules |
| 0.2.2 | Template caching, insert keyword support |
| 0.1.3 | Critical empty HTML rendering fix |
Full changelog available in source documentation
Security Note: Always validate untrusted JSON input and template variables in production environments.