Skip to content

Herman J. Radtke III

Tag: #rustlang

Landing Page Router Using Fastly Compute@Edge and WASM

A company often has a landing page for first time visitors that is optimized for describing and educating that person on what product or service the company is offering. This page is usually not useful for people already familiar with the company. Ideally, a new user would see the marketing landing page and the returning user would see a more functional page. There are two common approaches to solving this problem that both have pitfalls. I want to explore a third option using Fastly's Compute@Edge offering.

How To Mock Functions That Have External HTTP Requests

When writing tests, we do not want to hit the external API each time we run our tests. If we are coming from a dynamic language, such as Node.JS, we may want to a solution like fetch-mock which will patch the implementation of fetch at runtime. This is not practical in Rust. There are some attempts, like the hotpatch crate, but we will use a different strategy.

fastly/lucet in five minutes

Lucet is Fastly's native WebAssembly compiler and runtime. I am a big fan of Rust, Fastly and WASM. Especially WASM on the server via WASI. I jumped right in and tried to get my own lucet program running, but the setup is a rather long process. My plan was to introduce lucet to some colleagues at my local Rust meetup. I am a huge fan of Rust, but the compile times are an issue. Spending 30 minutes on setup was a non-starter. I was excited when I saw that Fastly published a Docker container: