Menu

1 / 11

Using Zig in our incremental Turborepo migration from Go to Rust

Vercel News·Nicholas Yang·5 months ago
#qh9Pr7st
#vercel#rust#code#binary#turborepo
Reading 0:00
15s threshold

Learn how we're cross-compiling a Rust-Go-Rust sandwich to six platforms.

We’ve been porting Turborepo , the high-performance build system for JavaScript and TypeScript, from Go to Rust. We talked about how we started the porting process , so now let’s talk about how we began porting our two main commands: run and prune .

Link to heading Since last time

When we last left off, we had begun our port by implementing global turbo and command line argument parsing in Rust. Because of issues around static linking and Go’s incompatibility with musl , an essential requirement for compatibility with Alpine Linux, we split Turborepo into two binaries: one Rust and one Go.

After that, we ported the auxiliary commands like login , link , unlink . These were fairly simple to port since they only required a basic HTTP client and some configuration management.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.