16. Testing
In JavaScript/TypeScript, testing is a whole ecosystem: Jest/Vitest/Mocha as runners, Chai/Expect for assertions, Istanbul for coverage, maybe ts-jest for transpilation. Configuring jest.config.js ...
In JavaScript/TypeScript, testing is a whole ecosystem: Jest/Vitest/Mocha as runners, Chai/Expect for assertions, Istanbul for coverage, maybe ts-jest for transpilation. Configuring jest.config.js ...
If you’re used to the NPM ecosystem and ES modules, you might think “module” = file and “package” = folder in node_modules. In Rust, the same ideas exist for compile performance and strict boundari...
As a TS developer you’re used to try/catch. It works well on V8, but it has a big downside: errors are invisible. You can’t tell from a signature like fn readFile(path: string): string that the fun...
This is a Rust async/await guide tailored for experienced TypeScript developers. As a senior TS developer you know the Event Loop, Promises, and the microtask queue. Rust’s async model is fundamen...
Now that you have Struct (space) and Trait (behavior), we focus on the third piece of Rust’s type system—and the hardest: Time. This is the biggest conceptual wall for TS developers. In TS, “time”...
8. Returning traits (impl Trait) 8.0 Why can’t we return -> Trait directly? Suppose you have two structs: struct Button (100 bytes) struct Label (20 bytes) Both implement the Draw trai...
This is a Rust Trait guide tailored for experienced TypeScript developers. You might think a Trait is just an interface. If you use it only that way, you’re using a small part of Rust. In Rust, tr...
This is a Rust structs guide for experienced TypeScript developers. In TypeScript we work with Object, Interface, and Class every day. You might think a Rust struct is just an Object with another ...
This is a Rust enums and pattern matching guide for experienced TypeScript developers. As a TS developer you may have a love-hate relationship with TS enum: it’s a runtime object, sometimes compil...
For JS/TS developers, these are usually separate: if is a “statement” for control flow, 1+1 is an “expression” for computation. Rust inherits from functional languages (Haskell, Scala, etc.): contr...
This is a Rust common collections guide tailored for experienced TypeScript developers. In TypeScript/JavaScript you mainly have Array (list, stack, queue) and Object/Map (key-value). V8 does a lo...
Rust’s strings are so different from TS that we devote a separate chapter to them. Strings: Buffer vs View In TS/JS (V8), string is a black box. You write const s = "hello" + "world"; V8 might op...
Since we’re already familiar with V8’s behavior, the event loop, and TypeScript’s structural type system, we’ll skip programming basics and go straight to Rust’s core design. We’ll use The Rust Pro...
Rust’s top-level design doesn’t come from industry patches (like Java adding GC to address C++ pointer issues); it comes from type theory and mathematical logic. To really understand Rust’s “way,”...
As experienced full-stack JavaScript/TypeScript developers, we’re used to the V8 engine managing memory behind the scenes and to TypeScript’s flexible structural type system. To understand Rust fr...
This cheat sheet is designed for TypeScript developers, aiming to help you map your existing knowledge to Rust syntax. 1. Variables & Mutability In TS, const means the reference is immutable,...
I recently acquired the same solar-powered WiFi IP camera mentioned in my Capturing H.264 Livestreams from IP Cameras: Wireless Solar IP67 Security Camera System. My goal was to programmatically c...
IDL programming language IDL, short for Interactive Data Language, is a programming language used for data analysis. It is popular in particular areas of science, such as astronomy, atmospheric phy...
Lambda script Lambda could collect POST body and URL params using event. For POST body, params could be extracted directly like event['param1']. As of September 2017, you no longer have to configu...
Images can be added to Mapbox using a Layer and Source. Layer Configuration Prepare a source configuration by referencing this document const Image_SOURCE_OPTIONS = { "type": "image", "ur...