Initial template commit
This commit is contained in:
149
.justfile
Normal file
149
.justfile
Normal file
@@ -0,0 +1,149 @@
|
||||
use-nightly:
|
||||
rustup default nightly
|
||||
rustup update
|
||||
|
||||
use-stable:
|
||||
rustup default stable
|
||||
rustup update
|
||||
|
||||
install-windows-cross-compilation-deps:
|
||||
yay -S nsis
|
||||
cargo install --locked cargo-xwin
|
||||
|
||||
install-deps: install-windows-cross-compilation-deps
|
||||
yay -S --needed \
|
||||
webkit2gtk-4.1 \
|
||||
base-devel \
|
||||
curl \
|
||||
wget \
|
||||
file \
|
||||
openssl \
|
||||
appmenu-gtk-module \
|
||||
libappindicator-gtk3 \
|
||||
librsvg
|
||||
|
||||
install-formatters-and-lsps:
|
||||
rustup component add rust-analyzer
|
||||
cargo install dprint leptosfmt
|
||||
taplo-cli --features "lsp" --locked
|
||||
|
||||
install-tauri:
|
||||
cargo install create-tauri-app
|
||||
cargo install tauri-cli
|
||||
|
||||
clean-cargo-tomls:
|
||||
cargo sort --workspace --grouped
|
||||
cargo machete --with-metadata --fix
|
||||
|
||||
fmt-rust:
|
||||
sh -c 'rustywind --custom-regex "(?:class=\"|.class\\(\"|.trace\\(\"|.inline\\(\"|(?:_?)(?:CLASSES|classes|CLASS|class)(?::\\s(?:&str|&\\x27static str|String))?.=.(?:String::new\\(\"|String::from\\(\"|\"))([_a-zA-Z0-9\\.,\\s\\-:\\[\\]()/#]+)(?:\")" --stdin | leptosfmt --stdin --rustfmt -q'
|
||||
|
||||
fmt:
|
||||
dprint fmt \
|
||||
--allow-no-files \
|
||||
--config .dprint.json \
|
||||
--incremental \
|
||||
--log-level warn
|
||||
|
||||
[linux]
|
||||
check-timings:
|
||||
RUSTFLAGS="-C panic=abort" \
|
||||
cargo check \
|
||||
--debug \
|
||||
--runner cargo-xwin \
|
||||
--target x86_64-pc-windows-msvc \
|
||||
-- \
|
||||
-Z build-std=std,panic_abort \
|
||||
-Z build-std-features=panic_immediate_abort
|
||||
|
||||
[windows]
|
||||
check-timings:
|
||||
RUSTFLAGS="-C panic=abort" \
|
||||
cargo check \
|
||||
--debug \
|
||||
--runner cargo-xwin \
|
||||
--target x86_64-pc-windows-msvc \
|
||||
-- \
|
||||
-Z build-std=std,panic_abort \
|
||||
-Z build-std-features=panic_immediate_abort
|
||||
|
||||
[linux]
|
||||
dev:
|
||||
RUSTFLAGS="-C panic=abort" \
|
||||
cargo tauri dev \
|
||||
--target x86_64-unknown-linux-gnu \
|
||||
-- \
|
||||
-Z build-std=std,panic_abort \
|
||||
-Z build-std-features=panic_immediate_abort
|
||||
|
||||
[windows]
|
||||
dev:
|
||||
RUSTFLAGS="-C panic=abort" \
|
||||
cargo tauri dev \
|
||||
--target x86_64-pc-windows-msvc \
|
||||
-- \
|
||||
-Z build-std=std,panic_abort \
|
||||
-Z build-std-features=panic_immediate_abort
|
||||
|
||||
[linux]
|
||||
build:
|
||||
RUSTFLAGS="-C panic=abort" \
|
||||
cargo tauri build \
|
||||
--debug \
|
||||
--target x86_64-unknown-linux-gnu \
|
||||
-- \
|
||||
-Z build-std=std,panic_abort \
|
||||
-Z build-std-features=panic_immediate_abort
|
||||
|
||||
[linux]
|
||||
test:
|
||||
RUSTFLAGS="-C panic=abort" \
|
||||
cargo run \
|
||||
-p template-e2e
|
||||
--target x86_64-unknown-linux-gnu \
|
||||
-- \
|
||||
-Z build-std=std,panic_abort \
|
||||
-Z build-std-features=panic_immediate_abort
|
||||
|
||||
[windows]
|
||||
build:
|
||||
RUSTFLAGS="-C panic=abort" \
|
||||
cargo tauri build \
|
||||
--debug \
|
||||
--target x86_64-pc-windows-msvc \
|
||||
-- \
|
||||
-Z build-std=std,panic_abort \
|
||||
-Z build-std-features=panic_immediate_abort
|
||||
|
||||
[linux]
|
||||
build-release:
|
||||
RUSTFLAGS="-C panic=abort" \
|
||||
cargo tauri build \
|
||||
--target x86_64-unknown-linux-gnu \
|
||||
-- \
|
||||
-Z build-std=std,panic_abort \
|
||||
-Z build-std-features=panic_immediate_abort \
|
||||
-Z build-std-features="optimize_for_size"
|
||||
|
||||
[windows]
|
||||
build-release:
|
||||
RUSTFLAGS="-C panic=abort" \
|
||||
cargo tauri build \
|
||||
--target x86_64-pc-windows-msvc \
|
||||
-- \
|
||||
-Z build-std=std,panic_abort \
|
||||
-Z build-std-features=panic_immediate_abort \
|
||||
-Z build-std-features="optimize_for_size"
|
||||
|
||||
cross-compile-windows:
|
||||
RUSTFLAGS="-C panic=abort" \
|
||||
cargo tauri build \
|
||||
--runner cargo-xwin \
|
||||
--target x86_64-pc-windows-msvc \
|
||||
-- \
|
||||
-Z build-std=std,panic_abort \
|
||||
-Z build-std-features=panic_immediate_abort \
|
||||
-Z build-std-features="optimize_for_size"
|
||||
|
||||
browser_drivers:
|
||||
geckodriver --host 127.0.0.1 --port 4444
|
||||
Reference in New Issue
Block a user