Skip to content
This repository was archived by the owner on Jan 3, 2026. It is now read-only.

Commit e370096

Browse files
Initial commit for rust-rm
This is the first commit of the _rust-rm_ project, a Rust implementation of an `rm(1)` [1] Unix command-like CLI. The goal of this `rm` command is to feel familiar yet be more safe and user friendly. Following [2, 3] it improves upon `rm(1)` with a (default) dry run mode, suggestions for next steps in its output, and a more modern CLI experience (thanks to the `clap` crate [4]). It also adds support for moving to the trash instead (thanks to the `trash` crate [5]). The project is formatted using rustfmt, extensively tested, documented, and analyzed. Effort has been put in to make the design extendable and open for changes, one way in which this manifests is the effective way in which compile-time features are integrated into the implementation. Similarly, effort has been put in to write tests and make writing tests simple. All of this is continuously verified using a Continuous Integration (CI) setup powered by GitHub Actions. Note that commands used in CI are available verbatim during local development to allow contributors to conveniently verify their changes will (likely) pass CI checks. This project is initialized for open source use and contributions with a OSI-approved license and docs for both users (README.md) and contributors (CONTRIBUTING.md). A security policy is also included to welcome security researches to look at the project. -- 1. https://man7.org/linux/man-pages/man1/rm.1.html 2. https://clig.dev/ 3. https://git-scm.com/docs/git-clean 4. https://crates.io/crates/clap 5. https://crates.io/crates/trash
0 parents  commit e370096

35 files changed

+10315
-0
lines changed

.editorconfig

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Check out EditorConfig at: https://editorconfig.org
2+
3+
root=true
4+
5+
[*]
6+
charset=utf-8
7+
insert_final_newline=true
8+
max_line_length=100
9+
trim_trailing_whitespace=true
10+
11+
[Justfile]
12+
indent_style=tab
13+
14+
[{*.md,LICENSE}]
15+
indent_size=unset
16+
indent_style=space
17+
18+
[*.rs]
19+
indent_size=4
20+
indent_style=space
21+
22+
[*.toml]
23+
indent_size=4
24+
indent_style=space
25+
26+
[*.{yml,yaml}}]
27+
indent_size=2
28+
indent_style=space

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
* text=auto
2+
3+
## Machine generated
4+
Cargo.lock -diff

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Check out Dependabot at: https://github.com/dependabot
2+
3+
version: 2
4+
updates:
5+
- package-ecosystem: cargo
6+
directory: /
7+
open-pull-requests-limit: 1
8+
schedule:
9+
interval: daily
10+
time: "04:00"
11+
labels:
12+
- dependencies

.github/workflows/audit.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Audit
2+
on:
3+
pull_request:
4+
paths:
5+
- .github/workflows/audit.yml
6+
- Cargo.lock
7+
- Cargo.toml
8+
- deny.toml
9+
- Justfile
10+
push:
11+
branches:
12+
- main
13+
schedule:
14+
- cron: 0 2 * * *
15+
workflow_dispatch: ~
16+
17+
permissions: read-all
18+
19+
jobs:
20+
cargo:
21+
name: Cargo
22+
runs-on: ubuntu-22.04
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # v3.5.1
26+
- name: Cache Rust & Cargo
27+
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
28+
with:
29+
path: |
30+
~/.cargo/registry/index/
31+
~/.cargo/registry/cache/
32+
~/.cargo/git/db/
33+
target/
34+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
35+
- name: Install Rust toolchain
36+
run: rustup show
37+
- name: Install Just
38+
uses: taiki-e/install-action@7522ae03ca435a0ad1001ca93d6cd7cb8e81bd2f # v2.6.18
39+
with:
40+
tool: just@1
41+
- name: Install cargo-deny
42+
uses: taiki-e/install-action@7522ae03ca435a0ad1001ca93d6cd7cb8e81bd2f # v2.6.18
43+
with:
44+
45+
- name: Audit
46+
run: just ci-audit

.github/workflows/compliance.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Compliance
2+
on:
3+
pull_request:
4+
paths:
5+
- .github/workflows/compliance.yml
6+
- Cargo.lock
7+
- Cargo.toml
8+
- deny.toml
9+
- Justfile
10+
push:
11+
branches:
12+
- main
13+
14+
permissions: read-all
15+
16+
jobs:
17+
license:
18+
name: License
19+
runs-on: ubuntu-22.04
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # v3.5.1
23+
- name: Cache Rust & Cargo
24+
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
25+
with:
26+
path: |
27+
~/.cargo/registry/index/
28+
~/.cargo/registry/cache/
29+
~/.cargo/git/db/
30+
target/
31+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
32+
- name: Install Rust toolchain
33+
run: rustup show
34+
- name: Install Just
35+
uses: taiki-e/install-action@7522ae03ca435a0ad1001ca93d6cd7cb8e81bd2f # v2.6.18
36+
with:
37+
tool: just@1
38+
- name: Install cargo-deny
39+
uses: taiki-e/install-action@7522ae03ca435a0ad1001ca93d6cd7cb8e81bd2f # v2.6.18
40+
with:
41+
42+
- name: Check compliance
43+
run: just ci-compliance

0 commit comments

Comments
 (0)