From ce711ab70e204b05d52db5cf86272ef6696ce990 Mon Sep 17 00:00:00 2001 From: Hugh Kaznowski Date: Sat, 5 Sep 2026 15:39:07 +0100 Subject: [PATCH] SImplify --- Cargo.lock | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 1 + WISHLIST.md | 4 +++ 3 files changed, 104 insertions(+) create mode 100644 WISHLIST.md diff --git a/Cargo.lock b/Cargo.lock index 34f3b57..939029a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -285,6 +285,33 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs-embed" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa472cd300c355f35a80431acd00bcb3de0d9af71b5755b8bc76bb74cb8a4acc" +dependencies = [ + "fs-embed-macros", + "include_dir", + "phf", + "tempfile", + "thiserror", + "walkdir", +] + +[[package]] +name = "fs-embed-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d81839e3b6ea8e909ba2cc03cf3fa0d08c6e820930ae156494e35e326fe15c3f" +dependencies = [ + "phf", + "proc-macro2", + "quote", + "syn 2.0.119", + "walkdir", +] + [[package]] name = "futures-channel" version = "0.3.34" @@ -468,6 +495,25 @@ dependencies = [ "cc", ] +[[package]] +name = "include_dir" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" +dependencies = [ + "proc-macro2", + "quote", +] + [[package]] name = "is_terminal_polyfill" version = "1.70.2" @@ -601,6 +647,7 @@ dependencies = [ "chrono", "clap", "directories", + "fs-embed", "http-body-util", "humantime", "pest", @@ -685,6 +732,24 @@ dependencies = [ "pest", ] +[[package]] +name = "phf" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +dependencies = [ + "phf_shared", +] + +[[package]] +name = "phf_shared" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +dependencies = [ + "siphasher", +] + [[package]] name = "pin-project-lite" version = "0.2.17" @@ -789,6 +854,15 @@ version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -877,6 +951,12 @@ dependencies = [ "libc", ] +[[package]] +name = "siphasher" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" + [[package]] name = "slab" version = "0.4.12" @@ -1104,6 +1184,16 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "wasi" version = "0.11.1+wasi-snapshot-preview1" @@ -1155,6 +1245,15 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys", +] + [[package]] name = "windows-core" version = "0.62.2" diff --git a/Cargo.toml b/Cargo.toml index e75f9d5..badeb38 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,7 @@ pest_derive = "2" chrono = "0.4" humantime = "2" directories = "6.0.0" +fs-embed = "0.2.4" [dev-dependencies] tempfile = "3.27.0" diff --git a/WISHLIST.md b/WISHLIST.md new file mode 100644 index 0000000..6db7646 --- /dev/null +++ b/WISHLIST.md @@ -0,0 +1,4 @@ +Use fs-embed crate for bundling the webapp. It should not be a clap arg (remove --static-dir arg). +Remove unused crates and deps etc +Reduce all comments to very clear direct and simple 1-liners if necessary. If the comment is not necessary, completely remove the comment. The code should be clear to read. The same goes for the docs in the webapp. +