Skip to content
View swnb's full-sized avatar
🎧
Code addiction
🎧
Code addiction

Highlights

  • Pro

Block or report swnb

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
swnb/README.md

Hi, I'm ZGY / swnb 👋

Product-minded engineer building type-safe tools, runtimes, visual systems, and data products.

TypeScript · Rust · Go · React · WASM · Data Systems

ocev · npm · picea


About me

I like building tools that turn messy real-world workflows into clear, typed, and debuggable systems.

My work usually sits between:

  • frontend infrastructure and developer experience
  • runtime / compiler / engine experiments
  • visual debugging tools
  • AI-assisted engineering workflows
  • market data and paper-trading systems

I started from product/UI work, but I enjoy pushing ideas all the way down to implementation details: API shape, type inference, runtime boundaries, tests, docs, and local verification loops.


Featured projects

A TypeScript event toolkit for writing cleaner WebSocket, WebRTC, DOM, and media event flows.

ocev started from a practical frontend pain point: DOM event handling is verbose, cleanup is easy to forget, and async event flows often become callback soup.

It provides:

  • type-safe SyncEvent
  • EventProxy for DOM / Web API event targets
  • waitUtil, waitUtilRace, waitUtilAll, waitUtilAny
  • async iterator event streams
  • ReadableStream support
  • debounce / throttle listener options
  • automatic event binding and cleanup
  • npm package, docs, tests, and CI
import { EventProxy } from "ocev"

const ws = EventProxy.new(new WebSocket(url))

await ws.waitUtilRace([
  { event: "open", timeout: 1000 },
  {
    event: "error",
    mapToError: () => new Error("websocket connect error"),
  },
])

for await (const { event, value } of ws.createEventStream(["message", "close", "error"])) {
  // typed event workflow
}

A work-in-progress 2D physics engine written in Rust.

Current focus:

  • World-based core API
  • deterministic simulation scenarios
  • debug snapshots and query pipeline
  • local simulator tooling
  • React Canvas workbench for visual inspection

Active labs

Some active repositories are private because they contain unfinished product experiments, local workflows, or research notes.

Yu Compiler

A Rust-based Scratch compiler and runtime experiment.

Current scope includes:

  • Scratch project parser
  • bytecode IR
  • VM / runtime
  • renderer backends
  • CLI tooling
  • Android runner / store shell experiments

Polytracer

A paper-only Polymarket account analysis and copy-trading simulator.

Safety boundary:

  • no private keys
  • no signing
  • no real orders
  • read-only data ingestion
  • paper replay and scoring only

FC Agent

A Rust cross-platform agent runtime experiment with a TypeScript/Vite browser validation shell.

Focus areas:

  • Agent core loop
  • WASM bridge
  • structured events
  • tool-call lifecycle
  • VirtualFS boundary
  • provider bridge and web timeline

What I care about

Typed APIs over stringly-typed glue
Small abstractions that survive real usage
Debuggable runtime behavior
Clear module boundaries
Docs that help future agents and humans
Tests before broad refactors
Product feel + engineering depth

Tech stack

Languages:    TypeScript, Rust, Go
Frontend:     React, Vue, Next.js, Vite, Canvas
Runtime:      WASM, SDL2, Web APIs, Event Systems
Data:         PostgreSQL, Redis, Drizzle, BullMQ
Tooling:      Jest, Vitest, Cargo, Docker, Just
AI Workflow:  Codex, repo maps, AGENTS.md, verification gates

Open source traces

I have contributed to frontend, Rust, WASM, agent tooling, and embedded-adjacent projects.

Some examples:

  • event library design and regression tests
  • HTTP client lifecycle fixes in long-running agent gateways
  • WASM binding ergonomics
  • Rust trait support improvements
  • frontend component interaction fixes
  • embedded TCP disconnect callback fixes

GitHub stats

swnb GitHub stats

Top languages

Pinned Loading

  1. ocev ocev Public

    event library with promise/stream support, proxy all event of web element

    TypeScript 37 2

  2. dct-ts dct-ts Public

    dct and idct algorithm implement with typescript

    TypeScript 1

  3. canvas-cut-better canvas-cut-better Public

    cut graphics with canvas in web

    TypeScript 1

  4. timer-rs timer-rs Public

    timer support both async and callback style, manage timeout callback

    Rust

  5. picea picea Public

    2D physics engine for web(wasm) and rust

    Rust 5