Feat: Rust rewrite of GNU cat program

- Added README.md
This commit is contained in:
minhtrannhat 2023-07-26 17:02:49 -04:00
commit 1c7e86e92b
Signed by: minhtrannhat
GPG Key ID: E13CFA85C53F8062
10 changed files with 46 additions and 0 deletions

3
.cargo/config.toml Normal file
View File

@ -0,0 +1,3 @@
[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=/bin/mold"]

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/target

7
Cargo.lock generated Normal file
View File

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "catr"
version = "0.1.0"

8
Cargo.toml Normal file
View File

@ -0,0 +1,8 @@
[package]
name = "catr"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

11
README.md Normal file
View File

@ -0,0 +1,11 @@
# Rust rewrite of GNU cat
## Dependencies
- `mold` - a high speed linker
- `clang`
## Build
`cargo build`
## Test
`cargo test`

3
src/main.rs Normal file
View File

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

0
tests/inputs/empty.txt Normal file
View File

1
tests/inputs/fox.txt Normal file
View File

@ -0,0 +1 @@
The quick brown fox jumps over the lazy dog.

3
tests/inputs/spiders.txt Normal file
View File

@ -0,0 +1,3 @@
Don't worry, spiders,
I keep house
casually.

View File

@ -0,0 +1,9 @@
The bustle in a house
The morning after death
Is solemnest of industries
Enacted upon earth,—
The sweeping up the heart,
And putting love away
We shall not want to use again
Until eternity.