My first ever Rust program!

Here, for posterity, is my first ever Rust program. It checks the key log on the Upspin Key Server. extern crate sha2; extern crate reqwest; use std::io::Read; use sha2::{Sha256, Digest}; fn main() { let mut resp = match reqwest::get("https://key.upspin.io/log") { Ok(resp) => resp, Err(e) => panic!(e), }; assert!(resp.status().is_success()); let mut content = String::new(); match resp.read_to_string(&mut…

Read it and weep

I searched for “how do I make an HTTP request in Rust?”. I’m a newbie, we do things like that. Don’t judge. I found this. I still don’t know how, because the answer marked correct refers to a library that a comment from 2016 informs me is no longer supported. There’s also a helpful comment…

A Go programmer continues to learn Rust

I went looking for the equivalent of goimports and didn’t find it. Sad. I wanted to use std::fmt to do the same thing as sprintf or fmt.Sprintf. I got stuck on “expected &str, found struct `std::string::String`”. I found a blog posting trying to explain it but I don’t understand enough yet to understand it. What…

A Go programmer’s first day with Rust

Where is the tutorial? The first Google hit gives a redirect to a page explaining that I should read the book. The first page of the book explains that I should read the Second Edition unless I want to go deep, then I should later read the First Edition also (and presumably ignore the things…