wow it actually works lol

This commit is contained in:
Eric S. Londres 2022-06-08 22:09:12 -04:00
commit 09c6a53215
Signed by: slondr
GPG Key ID: A2D25B4D5CB970E4
4 changed files with 107 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/target

87
Cargo.lock generated Normal file
View File

@ -0,0 +1,87 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "achaea"
version = "0.1.0"
dependencies = [
"spart",
]
[[package]]
name = "form_urlencoded"
version = "1.0.1"
source = "git+https://github.com/slondr/rust-url-additional-specials?branch=master#f2ebb7e2461d97f45a49aeb26d30815978513811"
dependencies = [
"percent-encoding",
]
[[package]]
name = "idna"
version = "0.2.3"
source = "git+https://github.com/slondr/rust-url-additional-specials?branch=master#f2ebb7e2461d97f45a49aeb26d30815978513811"
dependencies = [
"unicode-bidi",
"unicode-normalization",
]
[[package]]
name = "percent-encoding"
version = "2.1.0"
source = "git+https://github.com/slondr/rust-url-additional-specials?branch=master#f2ebb7e2461d97f45a49aeb26d30815978513811"
[[package]]
name = "spart"
version = "0.1.0"
source = "git+https://git.sr.ht/~slondr/spart#d27b9246209760cf651e636d896781ec3fb4eba8"
dependencies = [
"url",
"urlencoding",
]
[[package]]
name = "tinyvec"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
dependencies = [
"tinyvec_macros",
]
[[package]]
name = "tinyvec_macros"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
[[package]]
name = "unicode-bidi"
version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992"
[[package]]
name = "unicode-normalization"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9"
dependencies = [
"tinyvec",
]
[[package]]
name = "url"
version = "2.2.2"
source = "git+https://github.com/slondr/rust-url-additional-specials?branch=master#f2ebb7e2461d97f45a49aeb26d30815978513811"
dependencies = [
"form_urlencoded",
"idna",
"percent-encoding",
]
[[package]]
name = "urlencoding"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68b90931029ab9b034b300b797048cf23723400aa757e8a2bfb9d748102f9821"

9
Cargo.toml Normal file
View File

@ -0,0 +1,9 @@
[package]
name = "achaea"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
spart = { git = "https://git.sr.ht/~slondr/spart" }

10
src/main.rs Normal file
View File

@ -0,0 +1,10 @@
use std::env;
fn main() {
let args: Vec<String> = env::args().collect();
let url = &args[1];
match spart::get(url.to_string()) {
Err(e) => eprintln!("{}", e),
Ok(response) => println!("{}", response)
}
}