diff --git a/Makefile b/Makefile index f529f29..9876b75 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,22 @@ .POSIX: .PHONY: default dev fmt lint test test-unit test-load container update ci -default: fmt lint target/release/blog +default: fmt lint target/release -target/release/blog: src/ Cargo.toml - cargo build --release +target/release: src/ Cargo.toml Cargo.lock + cargo leptos build --release dev: bacon run fmt: cargo fmt + leptosfmt src/**/*.rs lint: cargo clippy -- --deny warnings + cargo fmt --check + leptosfmt src/**/*.rs --check test: lint test-unit @@ -30,7 +33,6 @@ update: nix flake update cargo update curl --silent --show-error --location 'https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.indigo.min.css' --output public/pico.min.css - curl --silent --show-error --location 'https://unpkg.com/htmx.org@2.0.4' --output public/htmx.min.js ci: @mkdir -p "${CACHE_DIR}/target" diff --git a/bacon.toml b/bacon.toml index a639a45..ef41501 100644 --- a/bacon.toml +++ b/bacon.toml @@ -2,8 +2,7 @@ default_job = "run" [jobs.run] command = [ - "cargo", "run", - "--color", "always", + "cargo", "leptos", "watch" ] need_stdout = true allow_warnings = true diff --git a/flake.lock b/flake.lock index 16e093b..21c8756 100644 --- a/flake.lock +++ b/flake.lock @@ -2,16 +2,16 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1745279238, - "narHash": "sha256-AQ7M9wTa/Pa/kK5pcGTgX/DGqMHyzsyINfN7ktsI7Fo=", + "lastModified": 1754248685, + "narHash": "sha256-IUGNakaPUF8JOBZlO8ISQzIC4ZSpowzZgcCw9Co8eqk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9684b53175fc6c09581e94cc85f05ab77464c7e3", + "rev": "bf9fa86a9b1005d932f842edf2c38eeecc98eef3", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-24.11", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index aa2cebc..05a4878 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,7 @@ { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; + # TODO rustc in NixOS stable is not new enough + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; }; outputs = { self, nixpkgs }: @@ -16,10 +17,14 @@ default = with nixpkgs.legacyPackages.${system}; mkShell { packages = [ bacon + binaryen cargo + cargo-leptos cargo-nextest clippy k6 + leptosfmt + lld rustc rustfmt ] ++ lib.optional stdenv.isDarwin [