Skip to content

Project Structure ​

Desktopr is a single repository that contains the runtime, the bridge, the SDK, the WebAssembly plugin workspace and the build automation.

PathContents
src-tauri/Rust/Tauri runtime and the native bridge commands
src-ts/TypeScript bridge injected into your web app, and the SDK source
sdk/The publishable desktopr npm package for your web application
wasm/WASI plugin template and example modules
apps/companion/The Desktopr Companion app
docs/This documentation site
conf-templates/, scripts/Configuration generation for dev and production builds
.github/workflows/build.ymlCross-platform build, optional signing and releases
.github/workflows/ci.ymlChecks and tests on every push and pull request

Generated files ​

Several files in src-tauri/ are generated from conf-templates/ by the scripts in scripts/, and are overwritten on every build:

Generated fileGenerated from
src-tauri/tauri.conf.jsonconf-templates/tauri.conf.template.prod.json (or .dev.json)
src-tauri/capabilities/remote.jsonconf-templates/remote.template.json
src-tauri/Cargo.tomlconf-templates/Cargo.template.toml
src-tauri/window.envscripts/prod-conf.sh
src-ts/bridge.constants.jsonconf-templates/bridge.constants.template.json

Edit the templates, not the generated files, and regenerate with npm run devconf (development) or npm run prodconf (production).

The bridge bundle ​

The TypeScript bridge is bundled to src-tauri/tsc/bridge.js and embedded into the Rust binary at compile time. It is not committed, so run npm run ts:compile:bridge before any cargo command:

sh
npm run ts:compile:bridge
cd src-tauri && cargo check --locked

Where your web app fits ​

Your web application is not part of this repository. Install the desktopr SDK in it to call native features, then choose how the app reaches it:

  • as a URL, with APP_URL — the app loads your site, and only that origin is granted the bridge;
  • embedded, with APP_FRONTEND=bundled and APP_FRONTEND_DIST pointing at your build output — the app runs offline from its own files. In CI the build action builds your app in its own repository and hands the directory over.

With neither, Desktopr ships the bundled local page, which is what the default configuration and the Companion app do.