This project lays out a bare minimum template for using ClojureScript with Tauri. Out of the box, the following is provided:
- Shadow CLJS
- React
- Helix
After cloning this repository, run the following commands in a terminal.
npm ci npm run tauri dev
The tauri dev
script will ensure a Shadow CLJS watch is started. If you are
using Emacs, then you can M-x cider-connect-cljs
and start coding!
The source code is organized exactly as any other Shadow CLJS project, but there
is an additional src-tauri
folder. This folder contains Rust code.
First ensure tauri.bundle.identifier
in src-tauri/tauri.conf.json
contains a
value other than com.tauri.dev
. Otherwise the build will fail, since this
value is expected to be unique.
After you have changed this value, you can simply run the following command.
npm run tauri build
If you use Mac, then this process produces a disk image with a release build of the app inside.
Since this project is launched with an NPM script, we need to provide fixed
versions of nrepl
, cider/cider-nrepl
, and cider/piggieback
. Depending on
the version of CIDER being used in your editor, you may need to downgrade the
versions in use by this template.
To learn more about ClojureScript, check out the official Quick Start guide.
To learn more about Tauri, see the official Tauri v1 Guide.