From<T> and Into<T>
From
From
I'm about 70% done rewriting one of my Wikipedia bots into Rust from Python. Reduced the runtime from 12+ hours to under 10 minutes.I suspect the final runtime will end up being no more than 15-20 minutes.Yay for fearless concurrency ^.^
I wrote a tutorial on how to deploy a #Rust web application on Wikimedia's #Toolforge platform: https://wikitech.wikimedia.org/wiki/Help:Toolforge/My_first_Rust_toolIt uses #Rocket and demonstrates how to make queries against #Wikipedia's MariaDB replicas.
I just released version 0.2.0 of the mwapi_responses crate. It automatically generates Rust types based on the query parameters specified for use in MediaWiki API requests. If you're not familiar with the MediaWiki API, I suggest you play around with the API sandbox. It is highly dynamic, with the user…
cargo-hack is the coolest #Rust testing tool I've learned about so far:
It was surprisingly simple to set up cross-building for #Windows binaries on my #Rust projects in CI: https://gitlab.com/legoktm/rust-ci-pipeline/-/commit/21c61d0412e6636c110fbd0461908c93ff5eda7cAnd the one place I was using Unix-specific code has been caught at compile time \o/Whenever I make new releases, Windows binaries will be uploaded by CI, but in the meantime here's my…
New project: prometheus-airnow-exporter scrapes air quality info for your zip code from AirNow.gov's APIhttps://lib.rs/crates/prometheus-airnow-exporterThrew it together pretty quickly as a PoC to see if I could set up alerting when the air gets bad.#airnow #prometheus #californiaproblems
Couldn't find a #btrfs snapshot backup tool that I liked so I just wrote my own: https://crates.io/crates/fridge-backupIt automatically takes daily snapshots and then you copy them to external drives, that's it. (Automatic cleanup is a TODO)Also, you should put your butter in the fridge so it doesn't go bad.
We're starting a #Wikimedia #Rust developers user group! https://meta.wikimedia.org/wiki/Wikimedia_Rust_developers_user_groupMy announcement to wikitech-l https://lists.wikimedia.org/pipermail/wikitech-l/2021-February/094272.html has more details on our goals so far.
New #Rust project: https://gitlab.com/legoktm/mwapi_responses POC to provide strict typing for dynamic #MediaWiki API queries.Discussion at https://github.com/magnusmanske/mediawiki_rust/issues/19
I started porting my #Toolforge support library to #Rust: https://crates.io/crates/toolforgeDocs at https://wikitech.wikimedia.org/wiki/User:Legoktm/toolforge_library and of course https://docs.rs/toolforge/
Wikimedia CI now supports #rustlang projects! https://phabricator.wikimedia.org/T256827#6396091It's simple for now: it'll run rustfmt, clippy, tests and then generate/publish coverage reports and documentation post-merge. More features/checks can be added as people need and request :)
It still feels a little magical, having #Rust run client-side. But I love it.
Over the past two weeks I significantly sped up two of my Toolforge tools by using Redis, a key-value database. The two tools, checker and shorturls were slow for different reasons, but now respond instantaneously. Note that I didn't do any proper benchmarking, it's just noticably faster. If you're not…
I'm skipped writing a post for week 4 and then didn't do any Rust related things for a week, so this is my week 5 update. The main (published) Rust I've written since my last post is a port of my w.wiki statistics Toolforge tool. It reads through compressed plaintext…