Hey, I'm pyk
A Security Researcher, which is a fancy way of saying I get paid to find bugs in smart contracts. This site is my personal notebook for things I'm learning, tools I'm building with Rust and my ongoing experiments with fuzzing.
Latest projects
This is a collection of my open-source tools and libraries. Each one started as an experiment to learn something new or to fix a problem I had. You'll find they're mostly written in Rust, simply because I enjoy building things with it.
-
cmdtest: CLI testing for Zig
-
xdgdir: A tiny Rust crate that finds the right directories for your app's config and data, following the XDG spec.
-
envfmt: A tiny Rust crate to expand environment variables in a string, just like your shell does.
Latest posts
This blog is my public notebook. It's where I document what I'm doing, share solutions to bugs, and write down my thoughts on Rust and other tech. These are basically my notes-to-self, which I post here in case they're useful to you.
-
I needed to test my CLI tool without writing to disk. I started with a messy
RefCellsetup but refactored it to use proper Rust borrowing instead. -
Experimenting with low-level optimizations in Zig. I wrote a benchmark to race SIMD vectors against bit-twiddling hacks for skipping JSON whitespace.
-
I'm building a benchmarking tool for Zig and needed CPU counters. This is how I wrapped Linux's
perf_event_opento be type-safe with comptime. -
I spent a while debugging a benchmark that was impossibly fast. Turns out LLVM is too smart. I fixed it by forcing runtime reads with volatile.
-
Measuring execution time under
1nsis hard. This post covers how I fixed accuracy issues in my Zig tool by running the function in batches. -
A classic stack-use-after-return bug I ran into with Zig. I was trying to be clever and pass a reader by reference, but ended up with a dangling pointer.
-
Working on
cmdtest, my Zig CLI testing tool, I ran into the problem of readingstdiofrom long-lived processes. This is my dive into why memory allocation is key for handling program output. -
My journey designing a Zod-like validation library in Zig. A dive into
comptime, type generation, and the trade-offs for good tooling support. -
I'm sharing my experience building
cmdtest, a Zig package for testing CLI apps. This post covers Zig I/O, comptime vs runtime, andbuild.zigimport quirks. -
My notes on building a VS Code extension using Bun and Mise. Covers build scripts, tasks, and a macOS fix for zsh
PATHissues.