[#1] Initial library setup.

Setting up our Rust format file and README.
This commit is contained in:
Myrddin Dundragon 2025-04-15 16:52:31 -04:00
parent 54db6247ae
commit 0350a151a9
2 changed files with 35 additions and 3 deletions

View File

@ -16,7 +16,7 @@ wrap_comments = true
format_code_in_doc_comments = true format_code_in_doc_comments = true
doc_comment_code_block_width = 80 doc_comment_code_block_width = 80
comment_width = 80 comment_width = 80
normalize_comments = true normalize_comments = false
normalize_doc_attributes = true normalize_doc_attributes = true
format_strings = true format_strings = true
format_macro_matchers = true format_macro_matchers = true

View File

@ -1,3 +1,35 @@
# rune # Rune
A simple lexical analysis library. **Rune** is a high-performance, customizable **lexical analysis library** written in Rust.
It transforms source files into tokens using a fast, cache-friendly design.
> _“Turn raw text into structured meaning — like spellcraft for source code.”_
## Features
- **Basic tokenization**: Whitespace, text, numbers, symbols, and newlines.
- **Flat `TokenStream` design**: Optimized for speed and cache locality.
- **Custom transforms**: Supply your own function to turn base tokens into domain-specific ones (like Markdown, HTML, or custom Domain Specific Languages).
- **Iterators and mutation**: Traverse or modify tokens efficiently.
## Getting Started
### Add to your project
This library is hosted on the CyberMages registry. To add it to a project the CyberMages registry will need to be added to Cargo as per the [Cargo Book][1].
[1]: https://doc.rust-lang.org/cargo/reference/registries.html "The Cargo Book: Registries"
First add the registry to your cargo config.toml file.
```toml
[registries.cybermages]
index = "sparse+https://workshop.cybermages.tech/api/packages/CyberMages/cargo/"
```
Then add this to your Cargo.toml file.
```toml
[dependencies]
rune = { registry = "cybermages" }
```