mirror of
https://github.com/TaKO8Ki/awesome-alternatives-in-rust
synced 2025-03-14 21:56:59 +00:00
Merge branch 'TaKO8Ki:main' into main
This commit is contained in:
commit
3c33ee86b6
4 changed files with 132 additions and 27 deletions
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
|
@ -1 +1,2 @@
|
|||
github: TaKO8Ki
|
||||
custom: https://stakes.social/0xC65ca20B670aa65fDd05DEBAFBF02D3387F316Cd
|
||||
|
|
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
|
@ -1,4 +1,4 @@
|
|||
Thank you for making awesome-rewrite-it-in-rust better!
|
||||
Thank you for making awesome-alternatives-in-rust better!
|
||||
|
||||
Here's a checklist for things that will be checked during review or continuous integration.
|
||||
|
||||
|
|
114
README.md
114
README.md
|
@ -1,21 +1,29 @@
|
|||
# Awesome Rewrite It In Rust ([RIIR](https://transitiontech.ca/random/RIIR))
|
||||
[](https://github.com/TaKO8Ki/awesome-rewrite-it-in-rust/actions)
|
||||
# Awesome Alternatives in Rust
|
||||
[](https://github.com/TaKO8Ki/awesome-alternatives-in-rust/actions)
|
||||
|
||||
A curated list of replacements for existing software written in Rust.
|
||||
|
||||
If you want to contribute, please read [CONTRIBUTING.md](CONTRIBUTING.md).
|
||||
|
||||
I renamed the repository to "Awesome Alternatives in Rust". The original name was "Awesome Rewrite It In Rust". For more details, please refer to [this issue](https://github.com/TaKO8Ki/awesome-alternatives-in-rust/issues/29).
|
||||
|
||||
## Table of contents
|
||||
|
||||
- [Applications](#applications)
|
||||
- [Container](#container)
|
||||
- [Games](#games)
|
||||
- [Performance](#performance)
|
||||
- [System tools](#system-tools)
|
||||
- [Terminal](#terminal)
|
||||
- [Text editors](#text-editors)
|
||||
- [Text processing](#text-processing)
|
||||
- [Utilities](#utilities)
|
||||
- [Web](#web)
|
||||
- [Development tools](#development-tools)
|
||||
- [Command runners](#command-runners)
|
||||
- [Linters](#linters)
|
||||
- [Libraries](#libraries)
|
||||
- [Email](#email)
|
||||
|
||||
## Applications
|
||||
|
||||
|
@ -23,7 +31,19 @@ If you want to contribute, please read [CONTRIBUTING.md](CONTRIBUTING.md).
|
|||
|
||||
#### [runc](https://github.com/opencontainers/runc)
|
||||
|
||||
* [youki](https://github.com/utam0k/youki) - An experimental container runtime written in Rust
|
||||
* [youki](https://github.com/containers/youki) - An experimental container runtime written in Rust
|
||||
|
||||
### Games
|
||||
|
||||
#### [Stockfish](https://github.com/official-stockfish/Stockfish/)
|
||||
|
||||
* [Pleco](https://github.com/sfleischman105/Pleco) - A Rust-based re-write of the Stockfish Chess Engine
|
||||
|
||||
### Performance
|
||||
|
||||
#### [jMeter](https://github.com/apache/jmeter)
|
||||
|
||||
* [drill](https://github.com/fcsonline/drill) - A HTTP load testing application written in Rust
|
||||
|
||||
### System tools
|
||||
|
||||
|
@ -35,18 +55,44 @@ If you want to contribute, please read [CONTRIBUTING.md](CONTRIBUTING.md).
|
|||
|
||||
* [frawk](https://github.com/ezrosent/frawk) - an efficient awk-like language
|
||||
|
||||
#### bash/PowerShell/fish
|
||||
|
||||
* [nushell](https://github.com/nushell/nushell/) - An attractive structured shell
|
||||
|
||||
#### bc
|
||||
|
||||
* [cpc](https://github.com/probablykasper/cpc) - Text calculator with support for units and conversion
|
||||
* [eva](https://github.com/NerdyPepper/eva) - a calculator REPL, similar to bc(1)
|
||||
|
||||
#### cat
|
||||
|
||||
* [bat](https://github.com/sharkdp/bat) - A cat(1) clone with wings.
|
||||
|
||||
#### [cloc](https://github.com/AlDanial/cloc)
|
||||
|
||||
* [loc](https://github.com/cgag/loc) - Count lines of code quickly.
|
||||
* [tokei](https://github.com/XAMPPRocky/tokei) - Count your code, quickly.
|
||||
|
||||
#### [coreboot](https://github.com/coreboot/coreboot)
|
||||
|
||||
* [oreboot](https://github.com/oreboot/oreboot) - oreboot is a fork of coreboot, with C removed, written in Rust.
|
||||
|
||||
#### cp
|
||||
|
||||
* [xcp](https://github.com/tarka/xcp) - An extended `cp`
|
||||
|
||||
#### cut
|
||||
|
||||
* [choose](https://github.com/theryangeary/choose) - A human-friendly and fast alternative to cut and (sometimes) awk
|
||||
|
||||
#### diff
|
||||
|
||||
* [delta](https://github.com/dandavison/delta) - A viewer for git and diff output
|
||||
|
||||
#### dig
|
||||
|
||||
* [dog](https://github.com/ogham/dog) - A command-line DNS client.
|
||||
|
||||
#### du
|
||||
|
||||
* [dua](https://github.com/Byron/dua-cli) - View disk space usage and delete unwanted data, fast.
|
||||
|
@ -68,6 +114,10 @@ If you want to contribute, please read [CONTRIBUTING.md](CONTRIBUTING.md).
|
|||
|
||||
* [hexyl](https://github.com/sharkdp/hexyl) - A command-line hex viewer
|
||||
|
||||
#### [httpie](https://github.com/httpie/httpie)
|
||||
|
||||
* [xh](https://github.com/ducaale/xh) - Friendly and fast tool for sending HTTP requests
|
||||
|
||||
#### ls
|
||||
|
||||
* [exa](https://github.com/ogham/exa) - A replacement for 'ls'
|
||||
|
@ -83,6 +133,14 @@ If you want to contribute, please read [CONTRIBUTING.md](CONTRIBUTING.md).
|
|||
|
||||
* [procs](https://github.com/dalance/procs) - A modern replacement for ps written in Rust
|
||||
|
||||
#### [rbenv](https://github.com/rbenv/rbenv)
|
||||
|
||||
* [frum](https://github.com/TaKO8Ki/frum) - A little bit fast and modern Ruby version manager written in Rust
|
||||
|
||||
#### rename
|
||||
|
||||
* [rnr](https://github.com/ChuckDaniels87/rnr) - A command-line tool to batch rename files and directories
|
||||
|
||||
#### rm
|
||||
|
||||
* [rip](https://github.com/nivekuil/rip) - A safe and ergonomic alternative to rm
|
||||
|
@ -92,6 +150,14 @@ If you want to contribute, please read [CONTRIBUTING.md](CONTRIBUTING.md).
|
|||
* [sad](https://github.com/ms-jpq/sad) - CLI search and replace | Space Age seD
|
||||
* [sd](https://github.com/chmln/sd) - Intuitive find & replace CLI (sed alternative)
|
||||
|
||||
#### strings
|
||||
|
||||
* [stringsext](https://github.com/getreu/stringsext) - Find multi-byte-encoded strings in binary data
|
||||
|
||||
#### sudo
|
||||
|
||||
* [please](https://gitlab.com/edneville/please) - `sudo` like program with regex support written in rust
|
||||
|
||||
#### time
|
||||
|
||||
* [hyperfine](https://github.com/sharkdp/hyperfine) - A command-line benchmarking tool
|
||||
|
@ -106,21 +172,39 @@ If you want to contribute, please read [CONTRIBUTING.md](CONTRIBUTING.md).
|
|||
* [bottom](https://github.com/ClementTsang/bottom) - Yet another cross-platform graphical process/system monitor.
|
||||
* [ytop](https://github.com/cjbassi/ytop) (no longer maintained) - A TUI system monitor written in Rust
|
||||
|
||||
#### uniq
|
||||
|
||||
* [huniq](https://github.com/koraa/huniq) - Filter out duplicates on the command line.
|
||||
|
||||
#### [yay](https://github.com/Jguer/yay)
|
||||
|
||||
* [paru](https://github.com/Morganamilo/paru) - Feature packed AUR helper
|
||||
|
||||
### Terminal
|
||||
|
||||
#### [tmux](https://github.com/tmux/tmux)
|
||||
|
||||
* [Zellij](https://github.com/zellij-org/zellij) - A terminal workspace with batteries included
|
||||
|
||||
#### [Spaceship](https://github.com/spaceship-prompt/spaceship-prompt)
|
||||
|
||||
* [starship](https://github.com/starship/starship) - ☄️🌌 The minimal, blazing-fast, and infinitely customizable prompt for any shell!
|
||||
|
||||
### Text editors
|
||||
|
||||
#### Vim
|
||||
|
||||
* [Amp](https://github.com/jmacdonald/amp) - A complete text editor for your terminal.
|
||||
|
||||
### Text processing
|
||||
|
||||
#### grep
|
||||
|
||||
* [ripgrep](https://github.com/BurntSushi/ripgrep) - ripgrep recursively searches directories for a regex pattern while respecting your gitignore
|
||||
|
||||
### Utilities
|
||||
|
||||
#### [codemod](https://github.com/facebook/codemod)
|
||||
#### [codemod](https://github.com/facebookarchive/codemod)
|
||||
|
||||
* [fastmod](https://github.com/facebookincubator/fastmod) - A fast partial replacement for the codemod tool
|
||||
|
||||
|
@ -132,6 +216,20 @@ If you want to contribute, please read [CONTRIBUTING.md](CONTRIBUTING.md).
|
|||
|
||||
* [jql](https://github.com/yamafaktory/jql) - A JSON Query Language CLI tool built with Rust 🦀
|
||||
|
||||
#### [lazygit](https://github.com/jesseduffield/lazygit)
|
||||
|
||||
* [gitui](https://github.com/extrawurst/gitui) - Blazing fast terminal-ui for git written in Rust 🦀
|
||||
|
||||
### Web
|
||||
|
||||
#### [Reddit](https://www.reddit.com/)
|
||||
|
||||
* [Lemmy](https://github.com/LemmyNet/lemmy) - 🐀 Building a federated alternative to reddit in rust
|
||||
|
||||
#### [teddit](https://codeberg.org/teddit/teddit)
|
||||
|
||||
* [libreddit](https://github.com/spikecodes/libreddit) - Private front-end for Reddit written in Rust
|
||||
|
||||
## Development tools
|
||||
|
||||
### Command runners
|
||||
|
@ -148,3 +246,11 @@ If you want to contribute, please read [CONTRIBUTING.md](CONTRIBUTING.md).
|
|||
#### [ShellCheck](https://github.com/koalaman/shellcheck)
|
||||
|
||||
* [Shellharden](https://github.com/anordal/shellharden) - The corrective bash syntax highlighter
|
||||
|
||||
## Libraries
|
||||
|
||||
### Email
|
||||
|
||||
#### [mjml](https://github.com/mjmlio/mjml)
|
||||
|
||||
* [mrml](https://github.com/jdrouet/mrml) - Blazing fast reimplementation of mjml in Rust (~200x faster)
|
||||
|
|
42
src/main.rs
42
src/main.rs
|
@ -183,7 +183,7 @@ fn get_url_core(url: String) -> BoxFuture<'static, (String, Result<(), CheckerEr
|
|||
|
||||
warn!("Error while getting {}, retrying: {}", url, status);
|
||||
if status.is_redirection() {
|
||||
res = Err(CheckerError::HttpError {status: status.as_u16(), location: ok.headers().get(header::LOCATION).and_then(|h| h.to_str().ok()).map(|x| x.to_string())});
|
||||
res = Err(CheckerError::HttpError {status: status.as_u16(), location: ok.headers().get(header::LOCATION).and_then(|h| h.to_str().map(|x| x.to_string()).ok())});
|
||||
break;
|
||||
} else {
|
||||
res = Err(CheckerError::HttpError {status: status.as_u16(), location: None});
|
||||
|
@ -202,16 +202,16 @@ fn get_url_core(url: String) -> BoxFuture<'static, (String, Result<(), CheckerEr
|
|||
res = Err(CheckerError::TravisBuildUnknown);
|
||||
break;
|
||||
}
|
||||
let query = matches.get(1).map(|x| x.as_str()).unwrap_or("");
|
||||
if !query.starts_with("?") || query.find("branch=").is_none() {
|
||||
let query = matches.get(1).map(|x| x.as_str()).unwrap_or_default();
|
||||
if !query.starts_with('?') || query.contains("branch=") {
|
||||
res = Err(CheckerError::TravisBuildNoBranch);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if let Some(matches) = GITHUB_ACTIONS_REGEX.captures(&url) {
|
||||
debug!("Github actions match {:?}", matches);
|
||||
let query = matches.get(1).map(|x| x.as_str()).unwrap_or("");
|
||||
if !query.starts_with("?") || query.find("branch=").is_none() {
|
||||
let query = matches.get(1).map(|x| x.as_str()).unwrap_or_default();
|
||||
if !query.starts_with('?') || query.contains("branch=") {
|
||||
res = Err(CheckerError::GithubActionNoBranch);
|
||||
break;
|
||||
}
|
||||
|
@ -251,27 +251,26 @@ async fn main() -> Result<(), Error> {
|
|||
let mut results: Results = fs::read_to_string("results/results.yml")
|
||||
.map_err(|e| format_err!("{}", e))
|
||||
.and_then(|x| serde_yaml::from_str(&x).map_err(|e| format_err!("{}", e)))
|
||||
.unwrap_or(Results::new());
|
||||
.unwrap_or_default();
|
||||
|
||||
let mut url_checks = vec![];
|
||||
|
||||
let min_between_checks: Duration = Duration::days(3);
|
||||
let max_allowed_failed: Duration = Duration::days(7);
|
||||
let mut do_check = |url: String| {
|
||||
if !url.starts_with("http") {
|
||||
return;
|
||||
}
|
||||
used.insert(url.clone());
|
||||
if let Some(link) = results.get(&url) {
|
||||
if let Working::Yes = link.working {
|
||||
let since = Local::now() - link.updated_at;
|
||||
if since < min_between_checks {
|
||||
return;
|
||||
if url.starts_with("http") {
|
||||
used.insert(url.clone());
|
||||
if let Some(link) = results.get(&url) {
|
||||
if let Working::Yes = link.working {
|
||||
let since = Local::now() - link.updated_at;
|
||||
if since < min_between_checks {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
let check = get_url(url).boxed();
|
||||
url_checks.push(check);
|
||||
}
|
||||
let check = get_url(url).boxed();
|
||||
url_checks.push(check);
|
||||
};
|
||||
|
||||
for (event, _) in parser.into_offset_iter() {
|
||||
|
@ -292,7 +291,7 @@ async fn main() -> Result<(), Error> {
|
|||
}
|
||||
}
|
||||
|
||||
let results_keys = results.keys().cloned().collect::<BTreeSet<String>>();
|
||||
let results_keys: BTreeSet<String> = results.keys().cloned().collect();
|
||||
let old_links = results_keys.difference(&used);
|
||||
for link in old_links {
|
||||
results.remove(link).unwrap();
|
||||
|
@ -301,7 +300,7 @@ async fn main() -> Result<(), Error> {
|
|||
|
||||
let mut not_written = 0;
|
||||
let mut last_written = Local::now();
|
||||
while url_checks.len() > 0 {
|
||||
while !url_checks.is_empty() {
|
||||
debug!("Waiting for {}", url_checks.len());
|
||||
let ((url, res), _index, remaining) = select_all(url_checks).await;
|
||||
url_checks = remaining;
|
||||
|
@ -351,7 +350,7 @@ async fn main() -> Result<(), Error> {
|
|||
}
|
||||
}
|
||||
fs::write("results/results.yml", serde_yaml::to_string(&results)?)?;
|
||||
println!("");
|
||||
println!();
|
||||
let mut failed: u32 = 0;
|
||||
|
||||
for (url, link) in results.iter() {
|
||||
|
@ -386,8 +385,7 @@ async fn main() -> Result<(), Error> {
|
|||
}
|
||||
}
|
||||
if failed == 0 {
|
||||
println!("No errors!");
|
||||
Ok(())
|
||||
Ok(println!("No errors!"))
|
||||
} else {
|
||||
Err(format_err!("{} urls with errors", failed))
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue