rawk-core

Crates.iorawk-core
lib.rsrawk-core
version0.0.5
created_at2025-12-21 16:10:38.940195+00
updated_at2026-01-21 20:07:52.236399+00
descriptionCore library for the AWK interpreter
homepagehttps://github.com/stefanalfbo/rawk
repositoryhttps://github.com/stefanalfbo/rawk
max_upload_size
id1998205
size67,424
Stefan Alfbo (stefanalfbo)

documentation

README

rawk-core

CI codecov License: MIT Deps.rs Crate Dependencies (latest) Crates.io Version

rawk logo

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.

Example

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()]);
}
Commit count: 79

cargo fmt