mirror of
https://git.vulpinecitrus.info/Lymkwi/estrus-navigator.git
synced 2024-11-23 02:46:35 +00:00
Initial commit
This commit is contained in:
commit
5db7f7c0d9
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/target
|
1116
Cargo.lock
generated
Normal file
1116
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
12
Cargo.toml
Normal file
12
Cargo.toml
Normal file
|
@ -0,0 +1,12 @@
|
|||
[package]
|
||||
name = "estrus"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
authors = ["Lymkwi"]
|
||||
license = "ACSL"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
reqwest = { version = "0.11.22", features = ["default-tls", "json", "gzip"] }
|
||||
tokio = { version = "1.33.0", features = ["rt-multi-thread", "macros", "net"] }
|
14
src/main.rs
Normal file
14
src/main.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
use reqwest::Client;
|
||||
|
||||
async fn find_ident(ident: &str) -> String {
|
||||
let client = Client::new();
|
||||
let res = client.get(format!("https://elixir.bootlin.com/api/ident/linux/{ident}?version=latest"))
|
||||
.send()
|
||||
.await.expect("No future failure");
|
||||
res.text().await.expect("Valid text sent")
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
println!("{}", find_ident("sk_buff").await)
|
||||
}
|
Loading…
Reference in a new issue