| Crates.io | rawk-core |
| lib.rs | rawk-core |
| version | 0.0.5 |
| created_at | 2025-12-21 16:10:38.940195+00 |
| updated_at | 2026-01-21 20:07:52.236399+00 |
| description | Core library for the AWK interpreter |
| homepage | https://github.com/stefanalfbo/rawk |
| repository | https://github.com/stefanalfbo/rawk |
| max_upload_size | |
| id | 1998205 |
| size | 67,424 |
Core implementation of an AWK interpreter, providing token definitions, lexical analysis, parsing, and evaluation. rawk-core is a Rust implementation of AWK with the goal of POSIX compatibility. Pronounced rök (Swedish for “smoke”).
rawk-core is a low-level interpreter crate. Higher-level CLI handling, file I/O, and argument parsing are expected to live in a separate crate or binary, see rawk.
use rawk_core::awk;
fn main() {
// Execute a simple AWK program that prints each input line
let output = awk::execute(
"{ print }",
vec!["foo".into(), "bar".into()],
);
// Each input line is echoed to the output
assert_eq!(output, vec!["foo".to_string(), "bar".to_string()]);
}