140 lines
7.1 KiB
Markdown
140 lines
7.1 KiB
Markdown
# Linux development
|
|
|
|
[Development guide](development.md) · [Linux installation and updates](installation.md#install-on-linux) · [Build Linux packages](builds.md#build-linux-packages)
|
|
|
|
This guide covers Linux source development, Browser preparation, and native desktop checks.
|
|
To install a supplied RuneStone package, use [Installation and updates](installation.md#install-on-linux).
|
|
Past build and test results are in the [Linux validation reference](archive/linux-validation-2026-10.md).
|
|
|
|
## Development prerequisites
|
|
|
|
Use a Linux source checkout with Node.js 24, pnpm 10, and a stable Rust toolchain.
|
|
See the [shared development requirements](development.md#requirements) for repository setup.
|
|
Use [Tauri's Linux prerequisites](https://v2.tauri.app/start/prerequisites/#linux) for native libraries, including GTK and WebKitGTK 4.1.
|
|
The first build needs internet access for dependencies.
|
|
|
|
Open a terminal with Node.js, pnpm, and Cargo available on its PATH.
|
|
If a command is missing, load the environment configured by its installer before you continue.
|
|
Do not copy Windows `node_modules`, `src-tauri/target`, or `browser-engine` folders into Linux.
|
|
|
|
## Record the development environment
|
|
|
|
Run these commands in the Linux session used for native checks:
|
|
|
|
```sh
|
|
cat /etc/os-release
|
|
uname -m
|
|
printf 'Desktop: %s\nSession: %s\n' "$XDG_CURRENT_DESKTOP" "$XDG_SESSION_TYPE"
|
|
```
|
|
|
|
Record the distribution, version, processor architecture, desktop, and session type with the source commit and test results.
|
|
Test the session you use first. Test both Wayland and X11 before claiming support for both.
|
|
An Intel/AMD build does not establish ARM support.
|
|
|
|
## Build and run from source
|
|
|
|
Run the commands below from the RuneStone repository root in a graphical Linux session.
|
|
Commands come from [package.json](../package.json) and [browser-runtime/package.json](../browser-runtime/package.json).
|
|
|
|
From the Linux checkout, install the project dependencies:
|
|
|
|
```sh
|
|
pnpm install --frozen-lockfile
|
|
npm ci --prefix browser-runtime
|
|
```
|
|
|
|
The built-in Browser is a separate Electron executable. A fresh checkout does not
|
|
contain `src-tauri/browser-engine`; prepare it on the same Linux architecture before
|
|
building or launching the native host:
|
|
|
|
```sh
|
|
pnpm browser:check
|
|
pnpm browser:test
|
|
npm --prefix browser-runtime run package
|
|
pnpm browser:stage
|
|
```
|
|
|
|
Use the native `package` command on ARM64 too; `package:linux` explicitly selects
|
|
x86_64. Staging verifies the executable permission and replaces the whole runtime
|
|
tree, so files from an older Windows or Linux package cannot leak into the new one.
|
|
An existing staged runtime is retained under `output/browser-stage-backups/` for
|
|
recovery. Do not copy Windows `browser-engine` output into a Linux build.
|
|
|
|
Electron must run as an ordinary desktop user with its sandbox enabled. Do not
|
|
work around sandbox failures with `--no-sandbox` or by running RuneStone as root.
|
|
Test the Browser on the intended distro, including its user-namespace policy.
|
|
The native host uses WebKitGTK and the Browser uses Electron; both need testing.
|
|
|
|
### Source checks
|
|
|
|
The full test suite needs the Table Formulas package.
|
|
Clone `RuneStone_Table_Formulas` beside RuneStone.
|
|
Install its dependencies as described in the [Table Formulas build example](plugin-development.md#example-table-formulas).
|
|
|
|
`pnpm build:plugins` builds only Table Formulas. Run these checks from the RuneStone repository root:
|
|
|
|
```sh
|
|
pnpm build:plugins
|
|
pnpm check
|
|
pnpm test
|
|
pnpm build
|
|
cargo test --manifest-path src-tauri/Cargo.toml --lib --locked
|
|
```
|
|
|
|
### Development session
|
|
|
|
Run the desktop app in your graphical Linux session:
|
|
|
|
```sh
|
|
pnpm tauri dev
|
|
```
|
|
|
|
This command starts Vite and opens the native desktop app. Keep the terminal open during development.
|
|
Save your work and press Ctrl+C in that terminal to stop the session.
|
|
See the [daily workflow](development.md#daily-workflow) for source edits and rebuild behavior.
|
|
|
|
A successful build does not establish desktop compatibility.
|
|
Browser tests use mocked desktop calls and Chromium. They do not test Linux file access or WebKitGTK behavior.
|
|
|
|
## Desktop checks
|
|
|
|
Use a disposable workspace outside the installation folder.
|
|
Record each result, the source commit, and any error message.
|
|
Use this checklist for native behavior after source changes. Voice typing is outside the Linux acceptance criteria.
|
|
Keep each result separate from the [historical validation records](archive/linux-validation-2026-10.md).
|
|
|
|
| Area | Pass criteria |
|
|
| --- | --- |
|
|
| Launch and windows | Open from the desktop, move, resize, minimize, maximize, and close. Unsaved edits trigger the close guard. |
|
|
| Files and paths | Create, save, reopen, rename, copy, and delete files. Check spaces, Unicode, and distinct `Note.md` and `note.md` files. |
|
|
| External edits | Edit a file in another editor. RuneStone detects the change and prevents silent replacement of conflicting edits. |
|
|
| Built-in Browser | Open a web page, type and scroll, open/close tabs, download a file, and restart the app. Check the packaged runtime too. |
|
|
| Editors | Edit Markdown, source code, tables, images, and diagrams. Check undo, keyboard shortcuts, and both themes. |
|
|
| Clipboard and dialogs | Copy and paste text, tables, and images. Check folder selection, external links, and file reveal. |
|
|
| Plugins | Install plugin ZIPs through Settings, enable them, restart, disable them, and remove them. Check plugin data persistence. |
|
|
| Terminal plugin | Install the Terminal ZIP. Bash starts in the workspace, accepts Unicode, resizes, and exits when its session closes. |
|
|
| Settings | Change preferences, restart, and confirm persistence. Check separate workspace windows. |
|
|
|
|
Build Terminal with the [Terminal example](plugin-development.md#example-terminal), then [install its ZIP](plugins.md#install-a-plugin).
|
|
Check terminal profiles after a desktop launch too. A desktop launcher can have a different `PATH` from an interactive shell.
|
|
|
|
Current filename rules reject some names that Linux permits, including colons and backslashes.
|
|
Use ordinary portable filenames for baseline checks. Record unsupported names as a limitation.
|
|
Mounted network shares need separate tests because Linux mount paths do not reliably select the current polling fallback.
|
|
Do not claim network workspace support from a local-disk test.
|
|
|
|
## Package builds
|
|
|
|
Use [Build Linux packages](builds.md#build-linux-packages) for Debian and AppImage commands, release handling, and package checks.
|
|
|
|
## Development help
|
|
|
|
| Problem | Action |
|
|
| --- | --- |
|
|
| Node.js, pnpm, or Cargo is missing | Load your toolchain environment and check the [development prerequisites](#development-prerequisites). |
|
|
| The Browser runtime is missing | From the repository root, repeat the Browser dependency, package, and staging commands in [Build and run from source](#build-and-run-from-source). |
|
|
| Electron reports a sandbox or user-namespace error | Keep the sandbox enabled. Record the error and distribution version. Run RuneStone as an ordinary desktop user. |
|
|
| A build stops | Record the first error, failed command, distribution version, and available memory and disk space. |
|
|
|
|
See [development help](development.md#development-help) for port conflicts, stale windows, and offline Cargo errors.
|