GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - uutils/awk: WIP drop-in replacement of gawk.

BranchesTags
Open more actions menu

Latest commit

 

History

453 Commits
453 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
interpreter
interpreter
 
 
lexer
lexer
 
 
parser
parser
 
 
src
src
 
 
tests
tests
 
 
util
util
 
 
.gitignore
.gitignore
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE-APACHE
LICENSE-APACHE
 
 
LICENSE-MIT
LICENSE-MIT
 
 
README.md
README.md
 
 
THIRD-PARTY-NOTICES.txt
THIRD-PARTY-NOTICES.txt
 
 
codebook.toml
codebook.toml
 
 
deny.toml
deny.toml
 
 
renovate.json
renovate.json
 
 
rust-toolchain.toml
rust-toolchain.toml
 
 
rustfmt.toml
rustfmt.toml
 
 

Repository files navigation

uutils logo

uutils AWK

Discord License License dependency status


uutils AWK is a WIP, cross-platform reimplementation of GNU AWK (a.k.a. gawk) in Rust.

Goals

uutils AWK aims to be a drop-in replacement for gawk. Differences with GNU are treated as bugs.

Our key objectives include:

  • Matching GNU's output (stdout and error code) exactly
  • Better error messages
  • Best-in-class memory safety
  • Improved performance
  • Providing comprehensive internationalization support (UTF-8, etc.)
  • Extensions when relevant

uutils AWK aims to work on as many platforms as possible, to be able to use the same utils on Linux, macOS, *BSD, Windows, WASI and other platforms. This ensures, for example, that scripts can be easily transferred between platforms.

Requirements

  • Rust (cargo, rustc)

Rust Version

uutils AWK follows Rust's release channels and is tested against stable, beta and nightly. The minimum supported Rust version at the moment is the previous stable version, that is, 1.95.0 at the time of writing.

State of the Repo

Check out #16.

Testing

GNU awk (gawk) Compatibility Testing

Track compatibility against GNU awk by running the upstream gawk testsuite against our Rust binary. Rather than reimplement gawk's test harness, we drive gawk's own (GPL) test Makefile with make check AWK=<wrapper>, where the wrapper execs our awk — the gawk sources are fetched fresh at test time and never copied into this repo.

# Fetch the gawk testsuite (one-time setup)
mkdir -p ../gnu.awk && (cd ../gnu.awk && bash ../awk/util/fetch-gnu.sh)

# Run compatibility tests
./util/run-gnu-testsuite.sh

# Verbose mode shows the diff for each failing test
./util/run-gnu-testsuite.sh -v

# Generate JSON results for CI
./util/run-gnu-testsuite.sh --json-output results.json

The harness builds our awk, runs gawk's make check with a wrapper named gawk, and classifies each test the way gawk's own pass-fail target does: a leftover _<name> file is a failure, its absence a pass, and tests that never run (group-skipped because of missing locales, MPFR, or shared-library support) are reported as skipped.

Unit Tests

cargo test --workspace

Contributing

To contribute to uutils AWK, please see CONTRIBUTING.

License

uutils AWK is licensed under either the MIT License or the Apache v2.0 License - see the LICENSE-MIT, LICENSE-APACHE files for details.

GNU AWK is licensed under the GPL 3.0 or later.

About

WIP drop-in replacement of gawk.

uutils.org/awk/

Resources

Readme
Activity
Custom properties

Stars

30 stars

Watchers

2 watching

Forks

10 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.