Skip to content
tezvyn:

Go & Rust

Go web services, Rust backends, systems programming

69 bites

Test yourself: Top 30 advanced Go & Rust interview questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Advanced everything in Go & Rust, page 4

advanced2 min read

Go's GC: Low-Latency Collection with Tri-color Marking

Go's GC uses a tri-color algorithm to find unused memory concurrently, avoiding long pauses. It's crucial for low-latency services. The main footgun is breaking the invariant: a 'finished' (black) object must never point to a new (white) one without notifying…

advanced2 min read

Rust Cargo Workspaces: A Monorepo Control Panel

A Cargo Workspace is a control panel for a multi-crate Rust project, unifying dependencies and build artifacts. Use it for related binaries and libraries to ensure consistent builds.

advanced2 min read

Go's `internal` Directory: Private by Convention

Go's internal directory creates private packages within your module, making them inaccessible to external projects. Use it for helper logic you don't want to support as a public API.

advanced2 min read

Rust's Arc<T>: Share Data Ownership Across Threads

Rust's Arc<T> lets multiple threads share ownership of heap data. It's a smart pointer that counts references atomically. Use it for shared caches or config. The footgun: Arc only makes sharing safe, not mutation—you still need a Mutex for that.

advanced2 min read

Rust's Rc<T>: Shared Ownership on a Single Thread

Rust's Rc<T> enables shared ownership within a single thread. Think of it as a counter on a heap-allocated resource: cloning an Rc increments the count, and the resource is freed only when the count hits zero. Use it for graph nodes with multiple owners.

advanced2 min read

Go's sync.Map: A Specialized Concurrent Map

Go's sync.Map is a concurrent map optimized for keys written once and read many times. It's ideal for long-lived caches, but it's not a generic replacement for a map with a mutex. The footgun is using it for frequent writes, which can be slower.

advanced2 min read

Using Box<T> for Heap Allocation in Rust

Rust's Box<T> is a smart pointer that moves data from the stack to the heap. It's essential for creating recursive types, like linked lists, whose size would otherwise be infinite. The main footgun is in FFI: never wrap a C-allocated pointer in a Box.

advanced2 min read

Rust's Turbofish (`::<>`): When the Compiler Needs Help

The turbofish (::<>) is your tool to resolve ambiguity when Rust's compiler can't infer a type or trait. Use it when a type implements multiple traits with same-named methods, forcing the compiler to pick the one you specify.

advanced2 min read

Zero-Cost Abstractions: Pay at Compile Time, Not Runtime

Zero-cost abstractions let you write high-level code that compiles to the same machine code as low-level optimizations. This is key in Rust for safe APIs without runtime overhead.

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles