Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions host/desktop/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,5 @@
"security": {
"csp": "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data:; connect-src ipc: http://ipc.localhost; object-src 'none'; base-uri 'none'; form-action 'none'; frame-src 'none'"
}
},
"bundle": {
"active": true,
"targets": ["deb", "appimage"],
"resources": {
"../../build/dioxus-todomvc.component.wasm": "components/dioxus-todomvc.component.wasm"
}
}
}
21 changes: 10 additions & 11 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@

default: check test

# Type-check and lint every workspace (Rust: both cargo workspaces, for the
# component target; TS: receiver + web).
check:
# Type-check and lint every workspace (Rust: the two component workspaces
# for the wasm target, the native host workspace; TS: receiver + web +
# desktop UI). Depends on desktop-ui because tauri's generate_context!
# refuses to compile without the frontendDist directory present.
check: desktop-ui
cargo clippy --workspace --target wasm32-wasip2 -- -D warnings
cargo clippy --manifest-path guests/web-sys/Cargo.toml --workspace --target wasm32-wasip2 -- -D warnings
cargo clippy --manifest-path host/Cargo.toml --workspace -- -D warnings
Expand Down Expand Up @@ -73,14 +75,11 @@ desktop-ui:
deno run -A host/desktop/build.ts

# Build the Tauri desktop app: the TodoMVC component it embeds, its
# frontend bundle, then the Rust binary. `resource_dir()` in an unbundled
# dev/CI build resolves to the binary's own directory (tauri-utils
# `platform::resource_dir`'s "cargo output directory" case), so the
# component the binary loads via `BaseDirectory::Resource` has to be
# copied there by hand rather than relying on `tauri.conf.json`'s
# `bundle.resources` (that only fires for `cargo tauri build`, which this
# recipe deliberately does not invoke — the dispatch names a plain
# `cargo build --release`).
# frontend bundle, then the Rust binary. The app is never bundled, so the
# component is copied beside the binary by hand: `resource_dir()` is the
# binary's own directory for an unbundled build, and a `bundle.resources`
# entry in tauri.conf.json would make tauri-build fail whenever the
# component has not been built yet (`just check` runs before it has).
desktop: host-component desktop-ui
cargo build --manifest-path host/Cargo.toml -p stream-dom-desktop --release
mkdir -p host/target/release/components
Expand Down
Loading