- Rust 97.3%
- Dockerfile 2.1%
- Shell 0.6%
|
All checks were successful
Test-build picca packages / macOS - Release (aarch64-apple-darwin) (push) Successful in 1m19s
Test-build picca packages / Debian 12 (powerpc64le-unknown-linux-gnu) (push) Successful in 2m25s
Test-build picca packages / Debian 12 (x86_64-unknown-linux-gnu) (push) Successful in 2m27s
Test-build picca packages / macOS - Release (x86_64-apple-darwin) (push) Successful in 1m16s
Test-build picca packages / Debian 12 (s390x-unknown-linux-gnu) (push) Successful in 2m40s
Test-build picca packages / Debian 13 (aarch64-unknown-linux-gnu) (push) Successful in 2m45s
Test-build picca packages / Debian 12 (riscv64gc-unknown-linux-gnu) (push) Successful in 2m48s
Test-build picca packages / Debian 13 (riscv64gc-unknown-linux-gnu) (push) Successful in 1m56s
Test-build picca packages / Linux - Release (aarch64-unknown-linux-gnu) (push) Successful in 58s
Test-build picca packages / Windows - Release (aarch64-pc-windows-msvc) (push) Successful in 3m56s
Test-build picca packages / Linux - Release (loongarch64-unknown-linux-musl) (push) Successful in 52s
Test-build picca packages / Debian 13 (x86_64-unknown-linux-gnu) (push) Successful in 2m4s
Test-build picca packages / Linux - Release (loongarch64-unknown-linux-gnu) (push) Successful in 1m50s
Test-build picca packages / Linux - Release (powerpc64le-unknown-linux-gnu) (push) Successful in 57s
Test-build picca packages / Linux - Release (aarch64-unknown-linux-musl) (push) Successful in 2m46s
Test-build picca packages / Linux - Release (i686-unknown-linux-gnu) (push) Successful in 2m43s
Test-build picca packages / Linux - Release (i686-unknown-linux-musl) (push) Successful in 3m0s
Test-build picca packages / Linux - Release (riscv64gc-unknown-linux-musl) (push) Successful in 57s
Test-build picca packages / Arch Linux (x86_64-unknown-linux-gnu) (push) Successful in 6m29s
Test-build picca packages / Cargo Registry (push) Successful in 6m49s
Test-build picca packages / Linux - Release (powerpc64le-unknown-linux-musl) (push) Successful in 2m35s
Test-build picca packages / Windows - Release (i686-pc-windows-msvc) (push) Successful in 3m21s
Test-build picca packages / Linux - Release (x86_64-unknown-linux-musl) (push) Successful in 55s
Test-build picca packages / Linux - Release (riscv64gc-unknown-linux-gnu) (push) Successful in 2m18s
Test-build picca packages / Linux - Release (sparc64-unknown-linux-gnu) (push) Successful in 2m25s
Test-build picca packages / Linux - Release (s390x-unknown-linux-gnu) (push) Successful in 2m32s
Test-build picca packages / Alpine (x86_64-unknown-linux-musl) (push) Successful in 8m27s
Test-build picca packages / Linux - Release (x86_64-unknown-linux-gnu) (push) Successful in 3m2s
Test-build picca packages / Rocky 8 (amd64) (push) Successful in 2m47s
Test-build picca packages / Windows - Release (x86_64-pc-windows-msvc) (push) Successful in 2m53s
Test-build picca packages / Rocky 9 (amd64) (push) Successful in 3m32s
Test-build picca packages / Debian 12 (aarch64-unknown-linux-gnu) (push) Successful in -1h58m3s
Test-build picca packages / Ubuntu 22 (aarch64-unknown-linux-gnu) (push) Successful in 3m35s
Test-build picca packages / Ubuntu 22 (powerpc64le-unknown-linux-gnu) (push) Successful in 2m10s
Test-build picca packages / Gentoo (push) Successful in 14m0s
Test-build picca packages / Ubuntu 22 (x86_64-unknown-linux-gnu) (push) Successful in 2m0s
Test-build picca packages / Ubuntu 22 (s390x-unknown-linux-gnu) (push) Successful in 3m44s
Test-build picca packages / Rocky 9 (arm64) (push) Successful in 8m59s
Test-build picca packages / Ubuntu 24 (aarch64-unknown-linux-gnu) (push) Successful in 2m41s
Test-build picca packages / Ubuntu 24 (powerpc64le-unknown-linux-gnu) (push) Successful in 2m0s
Test-build picca packages / Ubuntu 24 (s390x-unknown-linux-gnu) (push) Successful in 57s
Test-build picca packages / Alpine (aarch64-unknown-linux-musl) (push) Successful in 17m41s
Test-build picca packages / Debian 13 (s390x-unknown-linux-gnu) (push) Successful in 55s
Test-build picca packages / Debian 13 (powerpc64le-unknown-linux-gnu) (push) Successful in 2m1s
Test-build picca packages / Ubuntu 24 (x86_64-unknown-linux-gnu) (push) Successful in 2m33s
Test-build picca packages / Create Release (push) Successful in 1m18s
Test-build picca packages / Ubuntu 22 (riscv64gc-unknown-linux-gnu) (push) Successful in -2h2m16s
Test-build picca packages / Rocky 10 (amd64) (push) Successful in 7m34s
Test-build picca packages / Docker (push) Successful in 30m18s
Test-build picca packages / Rocky 10 (arm64) (push) Successful in 39m12s
Test-build picca packages / Rocky 10 (ppc64le) (push) Successful in 41m19s
Test-build picca packages / Rocky 9 (ppc64le) (push) Successful in 42m30s
Test-build picca packages / Rocky 10 (s390x) (push) Successful in 46m52s
Test-build picca packages / Rocky 9 (s390x) (push) Successful in 52m2s
Test-build picca packages / Rocky 8 (arm64) (push) Successful in 53m22s
Test-build picca packages / Ubuntu 24 (riscv64gc-unknown-linux-gnu) (push) Successful in 4m24s
|
||
|---|---|---|
| .forgejo/workflows | ||
| benches | ||
| case-studies | ||
| docker | ||
| docs | ||
| examples | ||
| man | ||
| singles | ||
| src | ||
| tests | ||
| .dockerignore | ||
| .gitignore | ||
| .rustfmt.toml | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
| Taskfile.yml | ||
picca
picca (acronym for a Parallel Implementation of Common Checksum Algorithms) is a relatively small Rust program and wrapper library intented to speed up hashing files by reading multiple files at once.
Awesome Features!
What CAN picca do?
picca can:
- Hash any file using any one of 50 algorithms! Current options can be found in the source code here.
- Read checksum files in BSD and GNU Tagged formats, and verify the files listed.
- Hash each file up to the number of cores/threads your CPU has, or a custom amount.
- Be a potential replacement for the UNIX
cksumutility and the individual algorithmic checksum utilities (sha256sum,b2sum, etc.) - Ignore common errors, such as missing files, and produce quiet output.
What is picca NOT?
- A custom implementation of each hashing algorithm. The hash algorithims are sourced from RustCrypto's hashes libraries.
How do I use such an awesome program?
picca operates mostly (if not, the same) as the UNIX cksum program. Here is a non-exhaustive list of examples:
- On it's own, picca will hash whatever comes in from standard input using the SHA256 algorithm.
$ picca ^D e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - $ echo hi | picca 98ea6e4f216f2fb4b69fff9b3a44842c38686ca685f3f55dc48c5d3fb1107be4 - - Using the
-aflag, you can change the algorithm (only with the single binary, see the section Installing the binaries for what that means).$ echo hi | picca -a md5 764efa883dda1e11db47671c4a3bbd9e - - Instead of reading from standard input, you can specify file(s) as arguments to hash the contents of them instead.
$ picca LICENSE 3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986 LICENSE - By default, picca will read and hash up to n files simultaneously in separate threads, where n is the amount of cores your CPU has. You can adjust the amount of threads using the
-tflag.# use only 4 threads $ picca -t4 LICENSE 3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986 LICENSE- If less than n files are specified, picca will ignore the thread count you specify and spawn as many threads as there are files.
- You can also use picca to verify the hash of files using the
-cflag.$ cat files.sha256 3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986 LICENSE $ picca -c files.sha256 LICENSE: OK- picca supports BSD-style and GNU-style checksum formats.
- For BSD-style checksums, if the hashes in your file are different than SHA256, you must specify the algorithm with
-a.
Project hosting distribution
The picca project is hosted on two separate Forgejo instances, Codeberg and my own (hereafter refered to as "my forge" or "forge"), mainly because I enjoy self-hosting, but also as an experiment to see if projects like these can survive being hosted like this. Here is what lives on each:
Both Codeberg and My Forge
- The raw Git repository
- All changes that occur on either platform are synced to the other immediately
Codeberg only
- Issue management and pull requests (to welcome community contributions)
- Project management (see the picca project)
- Forgejo releases
My Forge only
Installing the binaries
picca offers two categories of installs, refered to hereafter as "single" and "standalone" respectively:
- The singular
piccabinary that can hash with any of the supported algorithms (defaults to SHA256) - Individual binaries named after the only algorithm they can hash with, such as
md5sum,blake3sum, etc.
The single and standalone binaries can be installed in several different ways depending on what you prefer and/or what your operating system offers.
- Platform Agnostic
- Cargo (building and installing from source)
- Docker/Podman
- Linux
- Alpine 3.x
- Arch
- Debian 12, 13/Ubuntu 22, 24
- Enterprise Linux (Rocky/Red Hat) 8, 9, 10
- Gentoo
- Ubuntu 22, 24
- Individual Binaries
- macOS Binaries
- Windows Binaries
Cargo
This is essentially just compiling it yourself and putting it in the same $PATH location as Cargo so it can be invoked.
# You can use forge.steck.dev instead of codeberg.org in the following commands if you wish.
# to install the single binary:
cargo install --features lib --bin picca --git https://codeberg.org/bryson/picca
# to install all the standalone binaries
cargo install --features single --git https://forge.steck.dev/bryson/picca
# to install only a certain standalone binary, replace <NAME> with the name of the binary:
cargo install --features single --bin <NAME> --git https://forge.steck.dev/bryson/picca
Docker/Podman
Not really "installing" per se, but allows you to use it in an isolated environment.
A OCI image is available for use in an OCI-compatible container environment like Docker or Podman. The following examples use Docker.
# Run in a bare minimum container. -i is required to read from stdin, but I like to add --rm so I can skip the step of removing the container after.
docker run --rm -i forge.steck.dev/bryson/picca
# Mount file and scan it. -i is no longer needed since we won't read from stdin, but all arguments after the image name are passed to picca.
docker run --rm -v ./file:/tmp/file forge.steck.dev/bryson/picca /tmp/file
Adding to your image
FROM forge.steck.dev/bryson/picca:latest AS picca
COPY --from=picca /usr/local/bin/picca /usr/local/bin
Alpine Linux
Follow these instructions to set up the Alpine repository on your system.
Arch Linux
Follow these instructions to set up the Arch repository on your system.
Debian/Ubuntu Linux
Follow these instructions to set up the Apt repository on your system.
Enterprise Linux (Rocky, Red Hat)
Follow these instructions to set up the DNF repository on your system.
Gentoo Linux
The Gentoo package is hosted in a Git-based overlay on my forge.
# Use eselect to add the overlay
sudo eselect repository add bryson-steck git https://forge.steck.dev/pkg/gentoo.git
# Use emaint to sync the overlay
sudo emaint sync -r bryson-steck
# Finally, emerge picca
sudo emerge -av sys-apps/picca
Individual Binaries
If your distro doesn't appear above or has different requirements (architecture, libc, etc.), you can use one of the several release binaries and install them in a place you can find and use it.
# assuming that ~/bin is in $PATH:
cd ~
curl https://codeberg.org/bryson/picca/releases/download/v0.15.2/picca-v0.15.2-x86_64-unknown-linux-gnu.tar.xz | tar xvf - bin/picca
macOS
macOS binaries aren't packaged in an installer format, you must install them in a place you can find it.
# assuming that ~/bin is in $PATH:
cd ~
curl https://codeberg.org/bryson/picca/releases/download/v0.15.2/picca-v0.15.2-aarch64-apple-darwin.tar.xz | tar xvf - bin/picca
Windows
Windows binaries aren't packaged in an installer format, you must install them in a place you can find it.
# assuming that ~\bin is in $env:PATH:
Set-Location ~\Downloads
Invoke-WebRequest "https://codeberg.org/bryson/picca/releases/download/v0.15.2/picca-v0.15.2-x86_64-pc-windows-msvc.zip" -OutFile "picca-v0.15.2-x86_64-pc-windows-msvc.zip"
Expand-Archive ".\picca-v0.15.2-x86_64-pc-windows-msvc.zip"
Move-Item ".\picca-v0.15.2-x86_64-pc-windows-msvc\bin\picca.exe" ~\bin