FlowscopeDocs

Install

Build the desktop app or the browser version from source, or run either on the built-in simulator.

Flowscope is built from source. The repository has one Makefile with every task; make help lists them.

Requirements

ToolWhyHow to get it
rustupInstalls the pinned toolchainrustup.rs
Rust 1.98.0 with clippy, rustfmt and the wasm32-unknown-unknown targetPinned in rust-toolchain.tomlInstalled automatically by rustup on the first cargo command in the repository
wasm-bindgen-cliBrowser build onlycargo install wasm-bindgen-cli --version <version> --locked, with the version from Cargo.lock
wasm-opt (binaryen)Browser build only, optionalUsed for release builds when it is on your PATH
Python 3make serve onlyServes the built files with python3 -m http.server
Important

The wasm-bindgen-cli version must match the wasm-bindgen crate in Cargo.lock exactly. Look it up with grep -A1 'name = "wasm-bindgen"' Cargo.lock.

Desktop

Run the app on live data:

Terminal
make hub            # a local data hub on port 8790 (another terminal)
make desktop        # debug build, every market from the hub at HUB_URL

make desktop reads the hub at HUB_URL, by default http://127.0.0.1:8790, the one make hub starts. The app takes every market and its history from a data hub; without one it has no market data. See History and data.

For daily use, build the optimized binary:

Terminal
make release        # writes target/release/flowscope
./target/release/flowscope

The desktop window opens at 1680 × 1000 points and can shrink to 960 × 600. It renders with wgpu.

On the first start Flowscope opens the Orderflow desk preset. After that it restores the layout you used last. See Layouts.

What the desktop keeps on disk

The desktop keeps no market data: every chart’s history comes from the data hub again each session. It keeps your layouts and preferences in your data directory under flowscope/store/, and its log under flowscope/logs/. Details are in History and data.

Browser

The browser version is the same terminal compiled to WebAssembly.

Terminal
make web            # release build into web/dist
make web-dev        # faster, unoptimized build into web/dist
make serve          # build, then serve web/dist on http://localhost:8080

make serve takes a port: make serve PORT=9000. A plain static server has no /hub: add ?hub=<url> for a hub elsewhere; without a hub the app has no market data. make dev serves the build through the website, with a hub behind /hub.

The build script compiles flowscope-web for wasm32-unknown-unknown, runs wasm-bindgen --target web, runs wasm-opt -O3 on release builds when available, and copies web/index.html next to the output. The page draws into a <canvas id="flowscope">.

To host the build elsewhere, serve the contents of web/dist as static files.

Note

The uncompressed bundle is about 13 MB, fonts included. wasm-opt and HTTP compression bring it down considerably.

Differences from the desktop

DesktopBrowser
Engine threadsOne worker per core minus oneNone; the engine runs up to 8 ms per frame
Memory budget for markets3 GB768 MB
Layouts and preferencesflowscope/store/ in the data directorylocalStorage
Data hubFLOWSCOPE_HUB_URLThe website’s /hub, or ?hub=<url>
Fullscreen shortcut F11YesUse the browser’s own
SnapshotsClipboard and a PNG fileClipboard

Simulator

Flowscope has a built-in synthetic exchange: random-walk prices, a deep book that churns and a steady tape, roughly like a busy BTC perpetual (150 trades and 10 book updates of 60 levels per second, 1 000 levels deep). Use it to try the interface offline or to measure performance.

Terminal
make desktop-sim    # desktop on the simulator (sets FLOWSCOPE_SIM=1)
make serve-sim      # browser build; open http://localhost:8080/?sim

In the browser, any query string that contains sim starts the simulator. The bottom bar shows a Simulator status dot while it runs.

Release builds

Two tasks package Flowscope for others:

TaskResult
make distA Linux tarball in dist/: flowscope-<version>-<arch>-linux.tar.gz with the binary, the app icon, a desktop entry, the README and the licences, plus a .sha256 file. macOS and Windows builds are made on those systems; nothing cross-compiles.
make web-distA deployable static folder in web/dist: the optimised WebAssembly build with hashed, precompressed files, ready for any static host or CDN.
Terminal
make dist
tar xzf dist/flowscope-*-linux.tar.gz -C ~/opt

Check a build

Terminal
make check          # formatting, clippy (native and wasm), all tests
make probe          # connect to every venue headless and print what arrives

make probe is a quick way to confirm that your network reaches every venue before you open the app.

Next steps