Menu

Development

qed is a Rust and Tauri desktop app with a Svelte UI. The source is on GitHub; the plan lives in backlog.

Requirements

Running and checking

npm install
npm run tauri dev     # start the app
npm run check:all     # formatting, lints, Rust tests, Svelte type check

To build a site without the app:

cargo run -p qed-core --example build -- docs

The result lands in docs/_site/.

A test server to publish to

Publishing over SFTP needs a server. For development, the repository has a throwaway one in dev/test-server/compose.yml, run with Docker:

docker compose -f dev/test-server/compose.yml up -d     # start
docker compose -f dev/test-server/compose.yml down -v   # stop and forget everything

It starts two containers that share one folder:

What Where Details
SFTP server 127.0.0.1, port 2222 user qed, password qed, folder /www
Web server http://localhost:8080 shows whatever was published to /www

Both only listen on your own computer. The password is public, so never use this setup for anything real.

To try publishing from the app, add a target with exactly those details. On the first connection, qed shows the server's key fingerprint and asks whether to trust it. The server makes a new key each time it's recreated with down -v, so qed will warn that the key changed; that's expected here, and exactly the warning you'd want to take seriously with a real server. To continue, open the target with "Edit", click "Forget" next to the trusted key, save, and test the connection again.

Automated tests

The tests in crates/qed-core/tests/test_server.rs publish the demo site to this server and check the result over HTTP: first publish, unchanged re-publish, changed and deleted pages. They're skipped by a normal cargo test, so the test suite doesn't depend on Docker. To run them:

docker compose -f dev/test-server/compose.yml up -d
cargo test -p qed-core --test test_server -- --ignored --test-threads=1