<div align="center">
# `LibRASM`
<img src="../logo/rasm.png" width="300"/>
[](LICENSE)
[](https://www.rust-lang.org)
</div>
**RASM** — assembly language compiler. **LibRASM** — library for using **RASM**.
## How to use it
1. Add `librasm` to your Cargo.toml
```bash
cargo add librasm
```
or
```toml
librasm = "0.0.0" # Or latest version
```
2. You can use it! Example:
```rust
use librasm::{RASM, SourceASM};
fn main() {
let code = SourceASM::Slice("_start:
mov rax, 0
ret");
let mut rasm = RASM::new(code);
let _tokens = rasm.tokenize().unwrap();
let _ast = rasm.parse().unwrap();
let machine_code = rasm.compile().unwrap();
assert_eq!(machine_code.code, vec![0x48, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC3]);
}
```