Fast File Tree Navigation, Powered by WebAssembly

CI/CD
Jul 11, 2025
Fast File Tree Navigation, Powered by WebAssembly

We recently shipped a web-based file tree navigator so that you can see the files from a task's output. Seeing the file tree is helpful for configuring output filters. We currently do not display the contents of the files, but we will add that in the future.

To make browsing the file tree as fast as possible, we implemented it in WebAssembly.

Background on RWX's Architecture

Tasks run on RWX with content-based caching. This means that before running a task, a cache key is generated based on the exact contents of all of the files on the filesystem.

We generate a manifest of the entire filesystem using a proprietary binary format. Before running tasks, we merge all of the manifests for the dependencies together, apply filters, and then produce a cache key.

The algorithm is performance-intensive, and we want it to run as fast as possible, so we wrote it in Go.

Using WebAssembly

When building the web-based file tree browser, we wanted to reuse the code we had already written for parsing our proprietary binary format. We also wanted it to be as fast as possible.

Fortunately, Go makes it easy to compile to WebAssembly.

go build -o build/manifests.wasm ./wasm

The Go code:

wasm/main.go
1
package main
2
3
import (
4
"bytes"
5
"encoding/json"
6
"os"
7
"syscall/js"
8
9
"github.com/rwx-cloud/manifests/parsing"
10
)
11
12
func main() {
13
rwxManifestsJs := js.Global().Get("Object").New()
14
rwxManifestsJs.Set("parseManifest", js.FuncOf(parseManifest))
15
rwxManifestsJs.Set("quit", js.FuncOf(quit))
16
17
js.Global().Set("RwxManifests", rwxManifestsJs)
18
js.Global().Get("document").Call("dispatchEvent", js.Global().Get("CustomEvent").New("rwx-manifests:ready"))
19
20
select {}
21
}

We use this approach to ship the entire manifest to the browser, parse it client-side, and provide fast tree navigation.

Demo

Never miss an update

Get the latest releases and news about RWX and our ecosystem with our newsletter.

Share this post

Enjoyed this post? Pleas share it on your favorite social network!

Related posts

Read more on updates and advice from the RWX engineering team

See all posts
We deleted our Dockerfiles: a better, faster way to build container images
CI/CD

We deleted our Dockerfiles: a better, faster way to build container images

Two weeks ago, we deleted the Dockerfile for our application, and we deleted the step in our CI pipelines that previously ran docker build.

Nov 24, 2025
Read now
rwx run - development without the push and pull
CI/CD

rwx run - development without the push and pull

Beginning with version v2, rwx run can now launch a build directly from your terminal - local code changes included.

Nov 20, 2025
Read now
You Shouldn't Have To Change Your Cron Schedules Every Six Months
CI/CD

You Shouldn't Have To Change Your Cron Schedules Every Six Months

RWX supports more flexibility with cron schedules, such as specifying time zones, than what is available on Github Actions.

Nov 3, 2025
Read now