commit 09c6a5321537189482c1f4b1855287d94f2ee782 Author: Eric S. Londres Date: Wed Jun 8 22:09:12 2022 -0400 wow it actually works lol diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..00057fc --- /dev/null +++ b/Cargo.lock @@ -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" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..6baa580 --- /dev/null +++ b/Cargo.toml @@ -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" } \ No newline at end of file diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..06f54a0 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,10 @@ +use std::env; + +fn main() { + let args: Vec = env::args().collect(); + let url = &args[1]; + match spart::get(url.to_string()) { + Err(e) => eprintln!("{}", e), + Ok(response) => println!("{}", response) + } +}