Articles tagged #ftl-infra

Thumbnail for {{ page.title }}

Migrating from warp to axum

Falling out of love with warp

Back when I wrote this codebase, warp was the best / only alternative for something relatively high-level on top of hyper.

I was never super fond of warp’s model — it’s a fine crate, just not for me.

The way routing works is essentially building a type that gets larger and larger. One route might look like:

let bye = warp::path("bye") .and(warp::path::param()) .map(|name: String| format!("Good bye, {}!", name));
Thumbnail for {{ page.title }}

Cleaning up and upgrading third-party crates

The bleeding edge of rustc and clippy

Typically, you’d want a production application to use a stable version of Rust. At the time of this writing, that’s Rust 1.65.0, which stabilizes a bunch of long-awaited features (GATs, let-else, MIR inlining, split debug info, etc.).

Cool bear Cool Bear's hot tip

For every Rust release, Mara makes a wonderful recap thread on Twitter, on top of the official announcement.

Thumbnail for {{ page.title }}

Updating fasterthanli.me for 2022

In 2020, I switched from a static site generator to something homemade.

And, as tradition commands, I did a whole write-up about it.

Since writing articles and making videos is now my full-time occupation, I took some time to upgrade futile, my server software, to the latest and greatest the Rust ecosystem has to offer.

Thumbnail for {{ page.title }}

One funny way to bundle assets

Cool bear

There’s one thing that bothers me. In part 1, why are we using hyper-staticfile? Couldn’t we just use file:/// URLs?

Well, first off: showing off how easy it is to serve some static files, even in a “scary” language like Rust, is just not something I could pass up.

But also: think about distributing salvage as a tool. Will we want to distribute all those HTML/CSS/JS/font files alongside it?

Thumbnail for {{ page.title }}

The rest of the fucking owl

Cool bear

NO! No no no.

What?

Cool bear

WE WERE DONE!

Well… yes! But also no. We still shell out to a bunch of tools:

$ rg 'Command::new' src/commands/mod.rs 126: let variant = if let Ok(output) = run_command(Command::new("wslpath").arg("-m").arg("/")) { src/commands/cavif.rs 29: Command::new("cavif") src/commands/imagemagick.rs 25: Command::new(&self.bin) src/commands/cwebp.rs 25: Command::new("cwebp") src/commands/svgo.rs 25: Command::new("svgo")
Thumbnail for {{ page.title }}

Productionizing our poppler build

I was a bit anxious about running our poppler meson build in CI, because it’s the real test, you know? “Works on my machine” only goes so far, things have a tendency to break once you try to make them reproducible.

And I was right to worry… but not for the reasons I thought. As I tried to get everything to build in CI, there was a Pypi maintenance that prevented me from installing meson, and then Sourceforge was acting up.

Thumbnail for {{ page.title }}

Porting poppler to meson

It took a hot minute.

Cool bear

Try several weeks.

Well, yeah. I got to contribute to a bunch of open-source projects in the meantime though, so I’m fairly pleased with it!

  • libffi (for static linking)
  • cairo (more static linking!)
  • proxy-libintl (more static linking!)
  • expat (static linking strikes again)
  • poppler (for file descriptor stuff not properly gated on Windows, closed in favor of a similar MR)
Thumbnail for {{ page.title }}

Building poppler for Windows

I know what you’re thinking: haven’t we strayed from the whole “content pipeline” theme in this series?

Well… fair. But compiling and distributing software is part of software engineering, and unless you’re in specific circles, I see that taught a lot less than the “just write code and stuff happens” part.

Amos

Technically it’s release engineering, but who’s keeping track.

Go back to the homepage.