Using Zig in our incremental Turborepo migration from Go to Rust
Sep 8, 2023

Summary
This post details the incremental migration strategy for porting Turborepo's `run` and `prune` commands from Go to Rust. It introduces the 'Rust-Go-Rust sandwich' approach, where a Rust binary calls a Go binary which in turn calls statically linked Rust libraries. This method utilizes CGO for linking Rust static libraries into Go and protobuf for inter-language communication. The post also describes the process of porting specific functions like `getGlobalHashableEnvVars` by splitting code into Go and Rust implementations and using Go build tags for toggling.