| Crates.io | lunaris_engine |
| lib.rs | lunaris_engine |
| version | 0.1.0 |
| created_at | 2025-08-20 11:07:53.233288+00 |
| updated_at | 2025-08-20 11:09:59.399758+00 |
| description | A collection of efficient algorithms implemented in Rust for real-world projects. |
| homepage | https://darklunaris.vercel.app/ |
| repository | https://github.com/Darklunaris/lunaris_engine_rust |
| max_upload_size | |
| id | 1803230 |
| size | 325,434 |

A comprehensive, fast, and extensible algorithms library for Rust. Includes classic and modern techniques for lists, sets, maps, strings, graphs, and more β built with idiomatic Rust, strong typing, and clean APIs.
Environment: Rust 1.70+ (see Cargo.toml).
Add to your Cargo.toml:
[dependencies]
lunaris_engine = "0.1.0"
use lunaris_engine::*;
use lunaris_engine::{
list::{binary_search, merge_sort},
string::{is_palindrome, longest_common_prefix},
graph::{dijkstra, WeightedEdge},
};
fn main() {
// list algorithms
let arr = vec![1, 3, 5, 7, 9];
let idx = binary_search(&arr, 7);
let sorted = merge_sort(vec![5, 2, 4, 6, 1, 3]);
// String algorithms
let is_pal = is_palindrome("A man a plan a canal Panama");
let lcp = longest_common_prefix(&["flower", "flow", "flight"]);
// Graph algorithms
let graph = vec![
("A", vec![WeightedEdge::new("A", "B", 1), WeightedEdge::new("A", "C", 4)]),
("B", vec![WeightedEdge::new("B", "C", 2)]),
("C", vec![]),
].into_iter().collect();
let dist = dijkstra(&graph, "A");
println!("{:?}", (idx, sorted, is_pal, lcp, dist));
}
Each function includes Dartdoc with usage and time/space complexity.
lunaris_engine::*;T extends Comparable where appropriate.WeightedEdge<T>.cargo test
All tests pass in the repository (see test/).
Contributions are welcome!
Open a PR with a brief description and test cases.
MIT. See LICENSE.# lunaris-engine.rs