WaveCode.
An open optical code for media links, with a Rust SDK and web scanner.
WaveCode V1 example. A valid optical frame produced by the Rust encoder.
An optical format for media links
WaveCode is an optical format for media links. A small pattern of rounded bars encodes a supported track or video identity and, where the platform allows it, a starting timestamp. Unlike a generic shortened link, the code can be decoded without querying a WaveCode database.
I built the Rust library, the encoding and decoding tools, native bindings, and a separate web application for scanning and creating codes. The browser uses the Rust codec compiled to WebAssembly rather than maintaining a second TypeScript implementation.
What I worked on
- Optical V1 format, frame validation, error correction and decoding.
- Rust API, command-line tools, FFI/JVM bindings and WebAssembly interface.
- Mobile-first scanner and generator with camera, photo input and SVG/PNG export.
Encoding a media link
The sample on this page is an actual WaveCode frame generated by the Rust library. It is not a logo: the lengths of its bars carry the encoded data.
Parse the link
The encoder recognizes a supported platform and extracts the identity. A timestamp is retained only when the platform has a suitable native URL format.
Prepare the frame
The identity is packed into a versioned representation with validation and error-correction data.
Render the code
The result is mapped to 36 dual-rail columns and exported as SVG or PNG. A central quiet channel separates the two rails.
Scan locally
A Rust decoder compiled to WebAssembly processes the camera or uploaded image in the browser and reconstructs the original-platform link.
The browser does not send the photo to an image-recognition server, and the codec does not depend on a hosted catalogue of tracks.
Use WaveCode
Live camera scanning, photo import, code creation and SVG/PNG export are available in the full web app.
Inside the implementation
Format and error handling
V1 uses a fixed 36-column optical frame. The layout includes orientation information, a checksum and Reed–Solomon error correction. The decoder handles supported orientations and can tolerate some damaged symbols, though blur and severe perspective still cause failures.
I kept the visual structure consistent rather than making the data depend on a particular decorative style. That distinction matters when the same code may be printed, displayed on a screen or used on small objects.
One Rust implementation
The public Rust library is the source of truth for encoding and decoding. Its functionality is exposed through a CLI, native bindings and a WebAssembly adapter. The web application talks to that adapter through a worker so image processing does not block UI interactions.
This avoids subtle differences between decoders written independently for the browser and other platforms. Versioning also gives the format room to evolve without silently changing the meaning of existing codes.
Scanner UX
The web client supports live camera scanning, photo upload, creating a code from a link, and exporting real SVG/PNG files. The scan path tries different crops and scales for small or imperfect frames, with camera and torch controls when supported by the device.
Decoding runs locally. Camera restrictions, poor exposure or motion blur still affect the result, so the photo-upload path remains available as an alternative.
Where it stands
The library and browser scanner are working projects that I am still improving. The live web application provides the complete encode, scan and export workflow; the portfolio shows a valid sample and links to that application.
WaveCode supports music services and selected video platforms, including YouTube, TikTok and Instagram Reels. It is open source, and the format does not need a proprietary track-ID service.