Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
parasyte committed Dec 12, 2024
0 parents commit d08ca8b
Show file tree
Hide file tree
Showing 10 changed files with 572 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
github:
- parasyte
patreon: blipjoy
87 changes: 87 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: CI
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0'
jobs:
checks:
name: Check
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- 1.73.0
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Update apt repos
run: sudo apt -y update
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
shared-key: common
- name: Cargo check
run: cargo check --workspace

lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Update apt repos
run: sudo apt -y update
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy, rustfmt
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
shared-key: common
- name: Install cargo-machete
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-machete
- name: Cargo fmt
run: cargo fmt --all -- --check
- name: Cargo doc
run: cargo doc --workspace --no-deps
- name: Cargo clippy
run: cargo clippy --workspace --tests -- -D warnings
- name: Cargo machete
run: cargo machete

tests:
name: Test
runs-on: ubuntu-latest
needs: [checks, lints]
strategy:
matrix:
rust:
- stable
- beta
- 1.73.0
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Update apt repos
run: sudo apt -y update
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
shared-key: common
- name: Cargo test
run: cargo test --workspace
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
57 changes: 57 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[package]
name = "xxr"
description = "A modern xxd alternative: hexadecimal pretty printer."
version = "0.1.0"
authors = ["Jay Oster <[email protected]>"]
repository = "https://github.com/parasyte/xxr"
edition = "2021"
rust-version = "1.73.0"
keywords = ["bytes", "hex", "pretty", "viewer", "xxd"]
categories = ["command-line-utilities", "development-tools", "value-formatting"]
license = "MIT"
include = [
"/Cargo.*",
"/LICENSE",
"/README.md",
"/img/screenshot.png",
"/src/**/*",
]

[dependencies]
colorz = { version = "1.1.4", features = ["std"] }
error-iter = "0.4.1"
onlyargs = "0.2.0"
onlyargs_derive = "0.2.0"
onlyerror = "0.1.4"

[profile.release]
codegen-units = 1
lto = "fat"
18 changes: 18 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Copyright 2024 Jay Oster

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[![Crates.io](https://img.shields.io/crates/v/xxr)](https://crates.io/crates/xxr "Crates.io version")
[![Documentation](https://img.shields.io/docsrs/xxr)](https://docs.rs/xxr "Documentation")
[![unsafe forbidden](https://img.shields.io/badge/unsafe-forbidden-success.svg)](https://github.com/rust-secure-code/safety-dance/)
[![GitHub actions](https://img.shields.io/github/actions/workflow/status/parasyte/xxr/ci.yml?branch=main)](https://github.com/parasyte/xxr/actions "CI")
[![GitHub activity](https://img.shields.io/github/last-commit/parasyte/xxr)](https://github.com/parasyte/xxr/commits "Commit activity")
[![GitHub Sponsors](https://img.shields.io/github/sponsors/parasyte)](https://github.com/sponsors/parasyte "Sponsors")

# `xxr`

A modern `xxd` alternative: hexadecimal pretty printer.

![Screenshot](./img/screenshot.png)
Binary file added example.bin
Binary file not shown.
Binary file added img/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d08ca8b

Please sign in to comment.