Blog

hi, hello. welcome to my stream. i write commentary on cool things i find, and longform articles on software development, (computational) biology, startups, australia 🦘 and postgres!

Speeding up Rust builds on macOS

TIL

Via Nicholas Nethercote:

On macOS, XProtect (part of Gatekeeper) scans every newly created executable for malware. These scans can slow Rust builds down a lot.

[mac]OS scans every executable for malware on the first run. This makes sense for executables downloaded from the internet. It’s arguably less sensible for executables you compiled yourself.

According to the nexte.st docs, you can disable these scans for your terminal apps:

  • You can stop XProtect scans on your terminal (and other terminal emulators - Ghostty etc) by running sudo spctl developer-mode enable-terminal.

…80 more words

Bun has a built-in shell with template literal syntax

TIL

Just discovered that Bun has a built-in shell with the most intuitive syntax I’ve seen:

import { $ } from "bun";

const response = await fetch("https://hill.xyz");

// Use Response as stdin.
await $`cat < ${response} | wc -c`; // 1256

No more spawning child processes or dealing with callbacks. It even handles pipes:

await $`cat file.txt | grep pattern | wc -l`.text();

Very cool!