fcat (short for fastcat) - A 3x faster implementation of cat, using splice
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets Initial release Jul 31, 2018
ci Implement CI using Travis CI Aug 6, 2018
src
.gitignore
.travis.yml
Cargo.lock
Cargo.toml
Dockerfile
LICENSE-APACHE
LICENSE-MIT
Makefile
README.md
entrypoint Use `sh` as shell interpreter Aug 9, 2018
fastcat.svg

README.md

😼 fcat

Build Status

fastcat logo

fcat, short for fastcat, is a cat implementation in Rust using Linux's splice syscall.
With that little trick, it's more than three times as fast as the system cat in our benchmarks.
Read the announcement here.

cat myfile | pv -r > /dev/null
[1.90GiB/s]
fcat myfile | pv -r > /dev/null
[5.90GiB/s]

Installation

Note: Only works on Linux.
(But you can send me a pull request for other operating systems.)

cargo install fcat

Usage

fcat file1 file2 file3

Project goals

  • Be the fastest cat in town.
  • Be a drop-in replacement for (POSIX) cat.

Non-goals

  • Provide any additional functionality other than what cat provides.
    If you're looking for a more beautiful cat, check out bat.

Known issues

If you run fcat /dev/zero >> myfile, it fail with exit code EINVAL, because, according to the splice manpage: "The target file is opened in append mode."

Trivia

  • You probably won't ever need this, but it's a fun little experiment.
    Still, I wonder why this is not part of e.g. GNU cat...
  • What I like the most about the project is the logo.

License

fcat is licensed under either of

at your option.