minigrep_pack 0.1.1

A small clip clone of minigrep
Documentation
  • Coverage
  • 100%
    4 out of 4 items documented0 out of 3 items with examples
  • Size
  • Source code size: 8.23 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.28 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 15s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Joel-Ajayi

minigrep_pack

Small example crate and binary that demonstrate a simple line-oriented search (a micro "grep" clone).

Quick start

Build and run the binary with:

cargo run -- <query> <filename>

Example:

cargo run -- foo example.txt

Library usage

Programmatic usage:

  • Call minigrep_pack::Config::new(&args) to parse CLI-style arguments.
  • Call minigrep_pack::run(config) to perform the search and print matching lines.

Testing

Run the test suite with:

cargo test

Publishing checklist

  • Ensure cargo test passes.
  • Verify Cargo.toml contains correct metadata (authors, description, license, repository, readme).
  • Update version in Cargo.toml for a new release.
  • Run cargo publish --dry-run to validate before publishing.

License

MIT