diff --git a/.github/workflows/gh-pages-deploy.yml b/.github/workflows/gh-pages-deploy.yml index 8a25777..e2494f6 100644 --- a/.github/workflows/gh-pages-deploy.yml +++ b/.github/workflows/gh-pages-deploy.yml @@ -21,6 +21,7 @@ jobs: - name: Install nightly Rust uses: dtolnay/rust-toolchain@nightly with: + toolchain: "nightly-2025-02-01" components: clippy, rustfmt - name: Add WASM target diff --git a/Cargo.lock b/Cargo.lock index 6ecdfe1..df16c6f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -96,7 +96,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -212,7 +212,7 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -236,7 +236,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom", + "getrandom 0.2.15", "once_cell", "version_check", ] @@ -248,7 +248,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -332,55 +332,6 @@ dependencies = [ "libc", ] -[[package]] -name = "anstream" -version = "0.6.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" - -[[package]] -name = "anstyle-parse" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - [[package]] name = "anyhow" version = "1.0.86" @@ -419,7 +370,7 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -573,7 +524,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -610,13 +561,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -636,7 +587,7 @@ dependencies = [ "manyhow", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -648,11 +599,11 @@ dependencies = [ "collection_literals", "interpolator", "manyhow", - "proc-macro-utils", + "proc-macro-utils 0.8.0", "proc-macro2", "quote", "quote-use", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -722,6 +673,26 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "bincode" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36eaf5d7b090263e8150820482d5d93cd964a81e4019913c972f4edcc6edb740" +dependencies = [ + "bincode_derive", + "serde", + "unty", +] + +[[package]] +name = "bincode_derive" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf95709a440f45e986983918d0e8a1f30a9b1df04918fc828670606804ac3c09" +dependencies = [ + "virtue", +] + [[package]] name = "bit-set" version = "0.5.3" @@ -848,7 +819,7 @@ checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -865,9 +836,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.6.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "bytestring" @@ -906,9 +877,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.7" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" [[package]] name = "cc" @@ -1007,46 +978,6 @@ dependencies = [ "half", ] -[[package]] -name = "clap" -version = "4.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "clap_lex" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" - [[package]] name = "codespan-reporting" version = "0.11.1" @@ -1069,12 +1000,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" -[[package]] -name = "colorchoice" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" - [[package]] name = "com" version = "0.6.0" @@ -1150,31 +1075,17 @@ dependencies = [ [[package]] name = "config" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7328b20597b53c2454f0b1919720c25c7339051c02b72b7e05409e00b14132be" +checksum = "68578f196d2a33ff61b27fae256c3164f65e36382648e30666dde05b8cc9dfdf" dependencies = [ "convert_case 0.6.0", - "lazy_static", "nom", "pathdiff", "serde", "toml 0.8.14", ] -[[package]] -name = "console" -version = "0.15.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "unicode-width", - "windows-sys 0.52.0", -] - [[package]] name = "console_error_panic_hook" version = "0.1.7" @@ -1197,18 +1108,18 @@ dependencies = [ [[package]] name = "const_format" -version = "0.2.32" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" +checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" dependencies = [ "const_format_proc_macros", ] [[package]] name = "const_format_proc_macros" -version = "0.2.32" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" dependencies = [ "proc-macro2", "quote", @@ -1299,15 +1210,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crop" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "959e53a6ca6070e1819d23930c0147cfc0de843451a3b3d78827130c00fb33d2" -dependencies = [ - "str_indices", -] - [[package]] name = "crossbeam-deque" version = "0.8.5" @@ -1387,7 +1289,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -1398,7 +1300,7 @@ checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" dependencies = [ "darling_core", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -1480,13 +1382,13 @@ dependencies = [ [[package]] name = "derive-where" -version = "1.2.7" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" +checksum = "e73f2692d4bd3cac41dca28934a39894200c9fabf49586d77d0e5954af1d7902" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -1526,7 +1428,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -1593,12 +1495,6 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" -[[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - [[package]] name = "encoding_rs" version = "0.8.34" @@ -1779,7 +1675,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -1805,9 +1701,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -1820,9 +1716,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1830,15 +1726,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -1847,9 +1743,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" @@ -1881,32 +1777,32 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -2000,10 +1896,22 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "wasm-bindgen", ] +[[package]] +name = "getrandom" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", +] + [[package]] name = "gif" version = "0.13.1" @@ -2031,23 +1939,17 @@ dependencies = [ "xml-rs", ] -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - [[package]] name = "gloo-net" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43aaa242d1239a8822c15c645f02166398da4f8b5c4bae795c1f5b44e9eee173" +checksum = "c06f627b1a58ca3d42b45d6104bf1e1a03799df472df00988b6ba21accc10580" dependencies = [ "futures-channel", "futures-core", "futures-sink", "gloo-utils", - "http 0.2.12", + "http 1.1.0", "js-sys", "pin-project", "serde", @@ -2168,7 +2070,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.2.6", + "indexmap 2.9.0", "slab", "tokio", "tokio-util", @@ -2187,7 +2089,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.2.6", + "indexmap 2.9.0", "slab", "tokio", "tokio-util", @@ -2232,6 +2134,12 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" + [[package]] name = "hassle-rs" version = "0.11.0" @@ -2261,6 +2169,7 @@ dependencies = [ name = "heatmap-api" version = "0.1.0" dependencies = [ + "bincode", "chrono", "leptos", "serde", @@ -2273,6 +2182,7 @@ version = "0.1.0" dependencies = [ "async-std", "base64 0.22.1", + "bincode", "bytemuck", "cgmath", "chrono", @@ -2284,7 +2194,6 @@ dependencies = [ "image", "js-sys", "leptos", - "leptosfmt", "log", "png", "reqwest", @@ -2307,7 +2216,8 @@ dependencies = [ "actix-http", "actix-web", "approx 0.5.1", - "base64 0.13.1", + "base64 0.22.1", + "bincode", "chrono", "config 0.13.4", "deadpool-redis", @@ -2650,7 +2560,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -2723,12 +2633,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.3", ] [[package]] @@ -2748,7 +2658,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -2759,9 +2669,12 @@ checksum = "71dd52191aae121e8611f1e8dc3e324dd0dd1dee1e6dd91d10ee07a3cfb4d9d8" [[package]] name = "inventory" -version = "0.3.15" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767" +checksum = "ab08d7cd2c5897f2c949e5383ea7c7db03fb19130ffcfbf7eda795137ae3cb83" +dependencies = [ + "rustversion", +] [[package]] name = "io-lifetimes" @@ -2780,12 +2693,6 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" -[[package]] -name = "is_terminal_polyfill" -version = "1.70.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" - [[package]] name = "itertools" version = "0.11.0" @@ -2855,10 +2762,11 @@ checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -2928,9 +2836,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "leptos" -version = "0.6.12" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5fae88b21265cbb847c891d7cf660e284a1282da15459691992be9358e906fb" +checksum = "0cbb3237c274dadf00dcc27db96c52601b40375117178fb24a991cda073624f0" dependencies = [ "cfg-if", "leptos_config", @@ -2948,11 +2856,11 @@ dependencies = [ [[package]] name = "leptos_config" -version = "0.6.12" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec33b6f994829469ba7c62bfd5fb572a639071d0de715a41c2aa0df86301a4fa" +checksum = "62ed778611380ddea47568ac6ad6ec5158d39b5bd59e6c4dcd24efc15dc3dc0d" dependencies = [ - "config 0.14.0", + "config 0.14.1", "regex", "serde", "thiserror", @@ -2961,17 +2869,17 @@ dependencies = [ [[package]] name = "leptos_dom" -version = "0.6.12" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "867d2afc153cc0f1d6f775872d5dfc409385f4d8544831ee45f720d88f363e6b" +checksum = "8401c46c86c1f4c16dcb7881ed319fcdca9cda9b9e78a6088955cb423afcf119" dependencies = [ "async-recursion", "cfg-if", "drain_filter_polyfill", "futures", - "getrandom", + "getrandom 0.2.15", "html-escape", - "indexmap 2.2.6", + "indexmap 2.9.0", "itertools 0.12.1", "js-sys", "leptos_reactive", @@ -2991,27 +2899,27 @@ dependencies = [ [[package]] name = "leptos_hot_reload" -version = "0.6.12" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec5ce56051f2eff2c4736b7a2056177e67be19597b767ff72fbab20917a7422d" +checksum = "6cb53d4794240b684a2f4be224b84bee9e62d2abc498cf2bcd643cd565e01d96" dependencies = [ "anyhow", "camino", - "indexmap 2.2.6", + "indexmap 2.9.0", "parking_lot", "proc-macro2", "quote", - "rstml 0.11.2", + "rstml", "serde", - "syn 2.0.66", + "syn 2.0.101", "walkdir", ] [[package]] name = "leptos_macro" -version = "0.6.12" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "019016cc0193831660a7794aa046e4c01617d97ccb2f403a5c10b21744391a71" +checksum = "4b13bc3db70715cd8218c4535a5af3ae3c0e5fea6f018531fc339377b36bc0e0" dependencies = [ "attribute-derive", "cfg-if", @@ -3020,26 +2928,26 @@ dependencies = [ "itertools 0.12.1", "leptos_hot_reload", "prettyplease", - "proc-macro-error", + "proc-macro-error2", "proc-macro2", "quote", - "rstml 0.11.2", + "rstml", "server_fn_macro", - "syn 2.0.66", + "syn 2.0.101", "tracing", "uuid", ] [[package]] name = "leptos_reactive" -version = "0.6.12" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076064e3c84e3aa12d4bad283e82ba5968675f5f9714d04a5c38f169cd4f26b5" +checksum = "e4161acbf80f59219d8d14182371f57302bc7ff81ee41aba8ba1ff7295727f23" dependencies = [ "base64 0.22.1", "cfg-if", "futures", - "indexmap 2.2.6", + "indexmap 2.9.0", "js-sys", "oco_ref", "paste", @@ -3059,9 +2967,9 @@ dependencies = [ [[package]] name = "leptos_server" -version = "0.6.12" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "603064a2d7ac46dba4b3ed5397a475076f9738918dd605670869dfe877d5966c" +checksum = "4a97eb90a13f71500b831c7119ddd3bdd0d7ae0a6b0487cade4fddeed3b8c03f" dependencies = [ "inventory", "lazy_static", @@ -3073,56 +2981,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "leptosfmt" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a32703b257edc3de53d36550dc0ab88256f1980c5e0f6a8504d36d0310d6bc" -dependencies = [ - "anyhow", - "clap", - "console", - "glob", - "leptosfmt-formatter", - "rayon", - "similar", - "toml 0.7.8", -] - -[[package]] -name = "leptosfmt-formatter" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59a121867f28273fd3496b115e058d4ffa5070fbf2ff7383b40ad7336b43091e" -dependencies = [ - "crop", - "leptosfmt-pretty-printer", - "leptosfmt-prettyplease", - "proc-macro2", - "quote", - "rstml 0.10.6", - "serde", - "syn 2.0.66", - "thiserror", -] - -[[package]] -name = "leptosfmt-pretty-printer" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9d122a24b4668a28e90020d53a616caac0e6ca2d8d07a2138f719dd9a8d31fc" - -[[package]] -name = "leptosfmt-prettyplease" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d77ca25d6a5f5cacd7e79efa3c6cae2b950d1b45dcc4e46179fbc1762ad1b5d" -dependencies = [ - "leptosfmt-pretty-printer", - "proc-macro2", - "syn 2.0.66", -] - [[package]] name = "libc" version = "0.2.155" @@ -3157,7 +3015,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.52.5", ] [[package]] @@ -3270,7 +3128,7 @@ dependencies = [ "manyhow-macros", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -3279,7 +3137,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c64621e2c08f2576e4194ea8be11daf24ac01249a4f53cd8befcbb7077120ead" dependencies = [ - "proc-macro-utils", + "proc-macro-utils 0.8.0", "proc-macro2", "quote", ] @@ -3369,7 +3227,7 @@ checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.48.0", ] @@ -3384,7 +3242,7 @@ dependencies = [ "bitflags 2.5.0", "codespan-reporting", "hexf-parse", - "indexmap 2.2.6", + "indexmap 2.9.0", "log", "num-traits", "rustc-hash", @@ -3496,7 +3354,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -3557,7 +3415,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -3793,9 +3651,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "openssl" @@ -3820,7 +3678,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -3953,7 +3811,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -3990,14 +3848,14 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -4086,12 +3944,12 @@ checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" [[package]] name = "prettyplease" -version = "0.2.20" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -4126,6 +3984,27 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", +] + [[package]] name = "proc-macro-utils" version = "0.8.0" @@ -4137,11 +4016,22 @@ dependencies = [ "smallvec", ] +[[package]] +name = "proc-macro-utils" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eeaf08a13de400bc215877b5bdc088f241b12eb42f0a548d3390dc1c56bb7071" +dependencies = [ + "proc-macro2", + "quote", + "smallvec", +] + [[package]] name = "proc-macro2" -version = "1.0.85" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ "unicode-ident", ] @@ -4154,7 +4044,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", "version_check", "yansi", ] @@ -4175,7 +4065,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd" dependencies = [ "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -4204,18 +4094,18 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] [[package]] name = "quote-use" -version = "0.8.0" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b393938dcaab992375d7b3df7887fa98cc91c2f3590598251e7c609e2b788139" +checksum = "9619db1197b497a36178cfc736dc96b271fe918875fbf1344c436a7e93d0321e" dependencies = [ "quote", "quote-use-macros", @@ -4223,17 +4113,22 @@ dependencies = [ [[package]] name = "quote-use-macros" -version = "0.8.0" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d8772387900c205780e2c240cfe4dd01355ab4f96a503d99bdf34ad73180ef" +checksum = "82ebfb7faafadc06a7ab141a6f67bcfb24cb8beb158c6fe933f2f035afa99f35" dependencies = [ - "derive-where", - "proc-macro-utils", + "proc-macro-utils 0.10.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + [[package]] name = "rand" version = "0.8.5" @@ -4261,7 +4156,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", ] [[package]] @@ -4392,9 +4287,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.5" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -4404,9 +4299,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -4421,9 +4316,9 @@ checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "renderdoc-sys" @@ -4512,7 +4407,7 @@ checksum = "70ac5d832aa16abd7d1def883a8545280c20a60f523a370aa3a9617c2b8550ee" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", "untrusted", "windows-sys 0.52.0", @@ -4555,20 +4450,6 @@ dependencies = [ "smallvec", ] -[[package]] -name = "rstml" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7afcc74cab5d3118523b1f75900e1fcbeae7cac6c6cb800430621bf58add0bd" -dependencies = [ - "proc-macro2", - "proc-macro2-diagnostics", - "quote", - "syn 2.0.66", - "syn_derive", - "thiserror", -] - [[package]] name = "rstml" version = "0.11.2" @@ -4578,7 +4459,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.66", + "syn 2.0.101", "syn_derive", "thiserror", ] @@ -4603,7 +4484,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.66", + "syn 2.0.101", "walkdir", ] @@ -4641,9 +4522,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] @@ -4715,6 +4596,12 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustversion" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" + [[package]] name = "rustybuzz" version = "0.4.0" @@ -4814,9 +4701,9 @@ dependencies = [ [[package]] name = "self_cell" -version = "1.0.4" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a" +checksum = "0f7d95a54511e0c7be3f51e8867aa8cf35148d7b9445d44de2f943e2b206e749" [[package]] name = "semver" @@ -4861,7 +4748,7 @@ checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -4932,14 +4819,14 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] name = "server_fn" -version = "0.6.12" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06e6e5467a2cd93ce1accfdfd8b859404f0b3b2041131ffd774fabf666b8219" +checksum = "4fae7a3038a32e5a34ba32c6c45eb4852f8affaf8b794ebfcd4b1099e2d62ebe" dependencies = [ "bytes", "ciborium", @@ -4966,26 +4853,26 @@ dependencies = [ [[package]] name = "server_fn_macro" -version = "0.6.12" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09c216bb1c1ac890151397643c663c875a1836adf0b269be4e389cb1b48c173c" +checksum = "faaaf648c6967aef78177c0610478abb5a3455811f401f3c62d10ae9bd3901a1" dependencies = [ "const_format", "convert_case 0.6.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", "xxhash-rust", ] [[package]] name = "server_fn_macro_default" -version = "0.6.12" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00783df297ec85ea605779f2fef9cbec98981dffe2e01e1a9845c102ee1f1ae6" +checksum = "7f2aa8119b558a17992e0ac1fd07f080099564f24532858811ce04f742542440" dependencies = [ "server_fn_macro", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -5055,12 +4942,6 @@ dependencies = [ "quote", ] -[[package]] -name = "similar" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa42c91313f1d05da9b26f267f931cf178d4aba455b4c4622dd7355eb80c6640" - [[package]] name = "simplecss" version = "0.2.1" @@ -5197,12 +5078,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "str_indices" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9557cb6521e8d009c51a8666f09356f4b817ba9ba0981a305bd86aee47bd35c" - [[package]] name = "strict-num" version = "0.1.1" @@ -5243,9 +5118,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.66" +version = "2.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" dependencies = [ "proc-macro2", "quote", @@ -5261,7 +5136,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -5278,7 +5153,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -5377,7 +5252,7 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -5531,18 +5406,6 @@ dependencies = [ "serde", ] -[[package]] -name = "toml" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.19.15", -] - [[package]] name = "toml" version = "0.8.14" @@ -5564,26 +5427,13 @@ dependencies = [ "serde", ] -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap 2.2.6", - "serde", - "serde_spanned", - "toml_datetime", - "winnow 0.5.40", -] - [[package]] name = "toml_edit" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.9.0", "toml_datetime", "winnow 0.5.40", ] @@ -5594,7 +5444,7 @@ version = "0.22.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.9.0", "serde", "serde_spanned", "toml_datetime", @@ -5642,13 +5492,13 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -5695,7 +5545,7 @@ checksum = "1f718dfaf347dcb5b983bfc87608144b0bad87970aebcbea5ce44d2a30c08e63" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -5776,6 +5626,12 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" +[[package]] +name = "unty" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae" + [[package]] name = "url" version = "2.5.1" @@ -5838,19 +5694,13 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - [[package]] name = "uuid" -version = "1.9.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ea73390fe27785838dcbf75b91b1d84799e28f1ce71e6f372a5dc2200c80de5" +checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" dependencies = [ - "getrandom", + "getrandom 0.3.2", ] [[package]] @@ -5888,6 +5738,12 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "virtue" +version = "0.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "051eb1abcf10076295e815102942cc58f9d5e3b4560e46e53c21e8ff6f3af7b1" + [[package]] name = "waker-fn" version = "1.2.0" @@ -5919,48 +5775,59 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", + "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5968,28 +5835,31 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "wasm-streams" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" dependencies = [ "futures-util", "js-sys", @@ -6109,9 +5979,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", @@ -6171,7 +6041,7 @@ dependencies = [ "cfg_aliases 0.1.1", "codespan-reporting", "document-features", - "indexmap 2.2.6", + "indexmap 2.9.0", "log", "naga", "once_cell", @@ -6583,6 +6453,15 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags 2.5.0", +] + [[package]] name = "write16" version = "1.0.0" @@ -6672,9 +6551,9 @@ checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" [[package]] name = "xxhash-rust" -version = "0.8.10" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927da81e25be1e1a2901d59b81b37dd2efd1fc9c9345a55007f09bf5a2d3ee03" +checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3" [[package]] name = "yaml-rust" @@ -6711,7 +6590,7 @@ checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", "synstructure", ] @@ -6732,7 +6611,7 @@ checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -6752,7 +6631,7 @@ checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", "synstructure", ] @@ -6781,7 +6660,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 0c414de..03611a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,17 @@ [workspace] +resolver = "1" members = [ "heatmap-service", "heatmap-client", "heatmap-api", ] -resolver = "1" +[workspace.dependencies] +leptos = { version = "0.6.12", features = ["csr", "nightly"] } +serde = {version = "1.0.204", features = ["derive"] } +serde_json = "1.0.120" +chrono = "0.4.38" +log = "0.4.22" +geo = "0.28.0" +base64 = "0.22.1" +bincode = "2.0.1" diff --git a/README.md b/README.md index c820c4e..70297c3 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Archive Heatmap The goal of this project is to rewrite and consolidate the existing codebases for creating heatmaps of satellite data to create an interactive heatmap. This heatmap can currently display Sentinel-1 data with the ability to select date ranges and data types. The heatmap can also export to a png with formatting matching the old heatmap generation codebases. -## Compiling Locally +## Generating a PNG ### Generate sat_data.geojson 1. Navigate to the `data-ingest` directory 2. Create a file named `.env` @@ -12,31 +12,43 @@ The goal of this project is to rewrite and consolidate the existing codebases fo export DB_PASSWORD=change_me export DB_NAME=change_me ``` -4. 1) If you have the dependencies installed locally you can now run `python3 ingest.py` and `sat_data.geojson` will be generated - 2) If you have conda installed then you can create a conda enviornment using `env.yml` located inside the `Docker` directory, you can then run `python3 ingest.py` inside this environment to generate `sat_data.geojson` +4. To select a date range and data type to generate data for go into `create_sql.py` and change the default values of `generate_command` as you desire +5. 1) If you have docker installed then you can cd into `./Docker` and run `./run.sh` to generate `sat_data.geojson` + 2) If you have the dependencies installed locally you can now run `python3 ingest.py` and `sat_data.geojson` will be generated + + 3) If you have conda installed then you can create a conda enviornment using `env.yml` inside the `Docker` directory, you can then run `python3 ingest.py` inside this environment to generate `sat_data.geojson` ### Setting up rust 1. Install rust, rust-lang.org has instructions on how to go about this -2. This project uses nightly features of rust, this means you will need a nightly version of rust, run `rustup toolchain install nightly-2024-06-23` -3. To swtich to a nightly build of rust run `rustup override set nightly-2024-06-23-x86_64-unknown-linux-gnu` +2. This project uses nightly features of rust, this means you will need a nightly version of rust, run `rustup toolchain install nightly-2025-02-01` +3. To swtich to a nightly build of rust run `rustup override set nightly-2025-02-01` +4. Install the `wasm32-unknown-unknown` target with: `rustup target add wasm32-unknown-unknown` + +### Running the Service in Docker +1. Move `sat_data.geojson` to the `heatmap-service` directory, don't change the file name or the server will fail to find the data +2. Run the bash script `run-service-docker.sh` from the repository root, this will build a docker image to run the service and then start a container running the service. + +The service has a startup time, if you attempt to access the client before the service is running the client will be locked into a loading screen until you reload. You can check if the service is ready by checking the processes CPU usage, it should be close to 0%. The service should log `Service Running!` in the console when it is close to finsihed with setup. -### Setting up the server -This step requires you to have a .env file in the `heatmap-service` directory, it should have the following fields: +### Using the client +1. A release build of the client is available [here](https://asfadmin.github.io/archive_heatmaps/) +2. Once you are on the page select the date range, product type, and platform you would like to generate a heatmap for. Note that while the page may allow you to select ranges outside of those you generated `sat_data.geojson` with any data from those ranges will not be included. +3. After the new selection of data has loaded click `Export to PNG` and wait for the file to download. + + +## Running the Service Locally +If you would prefer to run the service locally you must have a `.env` file in the `heatmap-service` directory, it should have the following fields: ``` SERVER_ADDRESS=127.0.0.1:8080 # the bind address for the microservice CACHE_TTL=3600 # how long (in seconds) the cache should last for GEO_JSON_PATH=/path/to/geojson ``` -1. Move `sat_data.geojson` to the `heatmap-service` directory, don't change the file name or the server will fail to find the data +1. Move `sat_data.geojson` to the location specified in the `GEO_JSON_PATH` variable from your `.env` file 2. Navigate into the `heatmap-service` directory -3. Run `cargo run` in the terminal and you now have a locally running version of the server, if the terminal you entered this command into closes you will need to repeat this step in a new terminal +3. Run `cargo run --release --package heatmap-service` from repository root -### Setting up the client -1. Navigate to the `heatmap-client` directory -2. Install trunk, run `cargo binstall trunk` -3. Run `trunk serve --open`, this should open a page in your default browser, if you would prefer the command not open a page remove `--open` and it will serve the client without opening a new page -## Contributing +## Contributers Elliott Lewandowski
Lily Larson diff --git a/data-ingest/Docker/Dockerfile b/data-ingest/Docker/Dockerfile index 7fa3842..82265bc 100644 --- a/data-ingest/Docker/Dockerfile +++ b/data-ingest/Docker/Dockerfile @@ -5,9 +5,9 @@ FROM continuumio/miniconda3 WORKDIR /data_ingest # Copy all python files over -COPY ${PWD}/*.py . -COPY ${PWD}/Docker/env.yml . -COPY ${PWD}/.env . +COPY ./*.py . +COPY ./Docker/env.yml . +COPY ./.env . RUN apt update RUN apt install libgdal-dev \ diff --git a/data-ingest/Docker/run.sh b/data-ingest/Docker/run.sh index 7fa446c..9934725 100755 --- a/data-ingest/Docker/run.sh +++ b/data-ingest/Docker/run.sh @@ -8,7 +8,7 @@ sudo docker build -t data-ingest -f ./Docker/Dockerfile . sudo docker run --name data-ingest data-ingest # Copy the output back to the local machine -sudo docker cp data-ingest:/data_ingest/sat_data.geojson ../sat_data.geojson +sudo docker cp data-ingest:/data_ingest/sat_data.geojson ./sat_data.geojson # Delete the container sudo docker container rm -f data-ingest diff --git a/data-ingest/README.md b/data-ingest/README.md index 225d785..6e9ab57 100644 --- a/data-ingest/README.md +++ b/data-ingest/README.md @@ -12,9 +12,11 @@ This directory handles pulling data from a PostgreSQL database and formatting. T export DB_PASSWORD=change_me export DB_NAME=change_me ``` -3. 1) If you have the dependencies installed locally you can now run `python3 ingest.py` and `sat_data.geojson` will be generated +3. To select a date range and data type to generate data for go into `create_sql.py` and change the default values of `generate_command` as you desire +4. 1) If you have docker installed then you can cd into `./Docker` and run `./run.sh` to generate `sat_data.geojson` + 2) If you have the dependencies installed locally you can now run `python3 ingest.py` and `sat_data.geojson` will be generated - 2) If you have conda installed then you can create a conda enviornment using `env.yml` inside the `Docker` directory, you can then run `python3 ingest.py` inside this environment to generate `sat_data.geojson` + 3) If you have conda installed then you can create a conda enviornment using `env.yml` inside the `Docker` directory, you can then run `python3 ingest.py` inside this environment to generate `sat_data.geojson` ## Dependancies diff --git a/data-ingest/create_sql.py b/data-ingest/create_sql.py index 15b9e16..0f18a13 100644 --- a/data-ingest/create_sql.py +++ b/data-ingest/create_sql.py @@ -15,7 +15,7 @@ def generate_command( start=date.datetime(2021, 1, 1), end=date.datetime(2021, 1, 10), platform_type="'SA', 'SB'", - data_type="'GRD'", + data_type="'OCN', 'SLC', 'GRD'", ): cmd = ( diff --git a/data-ingest/ingest.py b/data-ingest/ingest.py index 7b51bba..9301305 100644 --- a/data-ingest/ingest.py +++ b/data-ingest/ingest.py @@ -4,7 +4,6 @@ import pandas as pd import antimeridian import data_merger -import datetime import shapely import os @@ -18,7 +17,7 @@ def ingest_data(): #################### # Generate SQL command to filter data in PostgreSQL DB - SQL = generate_command(data_type="'OCN', 'SLC', 'GRD'") + SQL = generate_command() # Load credentials to connect to DB load_dotenv() diff --git a/heatmap-api/Cargo.toml b/heatmap-api/Cargo.toml index acba579..7f99576 100644 --- a/heatmap-api/Cargo.toml +++ b/heatmap-api/Cargo.toml @@ -4,7 +4,8 @@ version = "0.1.0" edition = "2021" [dependencies] -chrono = "0.4.38" -leptos = "0.6.12" -serde = "1.0.204" -serde_json = "1.0.120" +chrono = { workspace = true } +leptos = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +bincode = { workspace = true } \ No newline at end of file diff --git a/heatmap-api/src/lib.rs b/heatmap-api/src/lib.rs index 3285af2..aa8c645 100644 --- a/heatmap-api/src/lib.rs +++ b/heatmap-api/src/lib.rs @@ -1,3 +1,4 @@ +use bincode::{Decode, Encode}; use serde::{Deserialize, Serialize}; pub trait ToPartialString { @@ -76,16 +77,16 @@ pub struct HeatmapQuery { // Server sends this back to client after a query, // contains the granule data -#[derive(Deserialize, Serialize, Debug, PartialEq)] +#[derive(Decode, Encode, Deserialize, Serialize, Debug, PartialEq)] pub struct HeatmapResponse { pub data: HeatmapData, } -#[derive(Deserialize, Serialize, Debug, PartialEq)] +#[derive(Encode, Decode, Deserialize, Serialize, Debug, PartialEq)] pub struct HeatmapData { pub data: InteriorData, } -#[derive(Deserialize, Serialize, Debug, PartialEq)] +#[derive(Encode, Decode, Deserialize, Serialize, Debug, PartialEq)] pub struct InteriorData { pub length: i32, pub positions: Vec>, diff --git a/heatmap-client/Cargo.toml b/heatmap-client/Cargo.toml index 1551b75..096b590 100644 --- a/heatmap-client/Cargo.toml +++ b/heatmap-client/Cargo.toml @@ -10,29 +10,29 @@ forced-target = "wasm32-unknown-unknown" async-std = "1.12.0" bytemuck = { version = "1.12", features = [ "derive" ] } cgmath = { version = "0.18.0", features = ["swizzle"] } -chrono = "0.4.38" console_error_panic_hook = "0.1.7" console_log = "1.0.0" earcutr = "0.4.3" image = "0.25.1" -leptos = { version = "0.6.12", features = ["csr", "nightly"] } -leptosfmt = "0.1.18" -log = "0.4.21" reqwest = { version = "0.12.5", features = ["json"] } -serde = "1.0.203" -serde_json = "1.0.118" wasm-bindgen = "0.2.92" wasm-bindgen-futures = "0.4.42" web-sys = { version = "0.3.69", features = ["Document", "Window", "Element"] } wgpu = { version = "0.20.1", features = ["webgl"] } winit = "0.30.3" heatmap-api = { path = "../heatmap-api" } -geo = "0.28.0" js-sys = "0.3.69" png = "0.17.13" urlencoding = "2.1.3" -base64 = "0.22.1" text-to-png = "0.2.0" +chrono = {workspace = true} +leptos = { workspace = true} +serde = {workspace = true} +serde_json = {workspace = true} +log = {workspace = true} +geo = {workspace = true} +base64 = {workspace = true} +bincode = {workspace = true} [lints.clippy] unwrap_used = "warn" diff --git a/heatmap-client/src/canvas/app.rs b/heatmap-client/src/canvas/app.rs index 021aebb..01fa1e0 100644 --- a/heatmap-client/src/canvas/app.rs +++ b/heatmap-client/src/canvas/app.rs @@ -106,7 +106,7 @@ impl ApplicationHandler> for App<'_> { self.exiting(event_loop); } - Err(e) => eprintln!("{:?}", e), + Err(e) => eprintln!("{e:?}",), } } @@ -149,7 +149,7 @@ impl ApplicationHandler> for App<'_> { web_sys::console::log_1(&"Assign state values in application handler...".into()); self.state = State { - render_context: Some(render_context), + render_context: Some(*render_context), window: self.state.window.clone(), init_stage: InitStage::Complete, geometry: None, @@ -256,7 +256,7 @@ impl ApplicationHandler> for App<'_> { } } - web_sys::console::log_1(&format!("Max: {:?}", max).into()); + web_sys::console::log_1(&format!("Max: {max:?}").into()); // We now update the uniform buffer with our max weight // so that we can read the max value in the colormap render pass @@ -314,7 +314,7 @@ impl ApplicationHandler> for App<'_> { .base64_png = Some(base64_encoded_png.clone()); } - web_sys::console::log_1(&format!("PNG Bytes: {:X?}", base64_encoded_png).into()); + web_sys::console::log_1(&format!("PNG Bytes: {base64_encoded_png:X?}").into()); // We dynamically generate this anchor element to download the generated png, it is removed after it goes out of scope { @@ -339,9 +339,9 @@ impl ApplicationHandler> for App<'_> { } } } -// All user events that can be sent to the event loop +/// All user events that can be sent to the event loop pub enum UserMessage<'a> { - StateMessage(RenderContext<'a>), + StateMessage(Box>), IncomingData(Vec, Vec), MaxWeightMapped, ExportMapped, diff --git a/heatmap-client/src/canvas/geometry.rs b/heatmap-client/src/canvas/geometry.rs index d89b11b..342d34a 100644 --- a/heatmap-client/src/canvas/geometry.rs +++ b/heatmap-client/src/canvas/geometry.rs @@ -102,7 +102,7 @@ fn gen_lod_layers( render_context .device .create_buffer_init(&wgpu::util::BufferInitDescriptor { - label: Some(&(format!("{:?} LOD {:?} Vertex Buffer", label, i))), + label: Some(&(format!("{label:?} LOD {i:?} Vertex Buffer"))), contents: bytemuck::cast_slice(layer.vertices.as_slice()), usage: wgpu::BufferUsages::VERTEX, }); @@ -111,7 +111,7 @@ fn gen_lod_layers( render_context .device .create_buffer_init(&wgpu::util::BufferInitDescriptor { - label: Some(&(format!("{:?} LOD {:?} Index Buffer", label, i))), + label: Some(&(format!("{label:?} LOD {i:?} Index Buffer"))), contents: bytemuck::cast_slice(layer.indices.as_slice()), usage: wgpu::BufferUsages::INDEX, }); diff --git a/heatmap-client/src/canvas/png.rs b/heatmap-client/src/canvas/png.rs index 51b076e..05262ec 100644 --- a/heatmap-client/src/canvas/png.rs +++ b/heatmap-client/src/canvas/png.rs @@ -27,7 +27,7 @@ pub fn generate_heatmap_image(render_context: &mut RenderContext, filter: Filter color_data.push(f32::from_le_bytes([*raw[0], *raw[1], *raw[2], *raw[3]])); } - web_sys::console::log_1(&format!("Freshley decoded: {:?}", color_data).into()); + web_sys::console::log_1(&format!("Freshley decoded: {color_data:?}").into()); // Convert the raw image data into an ImageBuffer that can be saved, must use copy texture width here, // Copy Texture is 256 byte aligned so copy_texture.width() is larger than displayed size and so @@ -168,9 +168,7 @@ pub fn generate_export_image( last_upper = upper; layer += 1; - web_sys::console::log_1( - &format!("Upper: {:?}\nRunning Total: {:?}", upper, last_upper).into(), - ); + web_sys::console::log_1(&format!("Upper: {upper:?}\nRunning Total: {last_upper:?}").into()); } // Last range in legend, formatting is unique so it cant be done in the loop diff --git a/heatmap-client/src/canvas/render_context.rs b/heatmap-client/src/canvas/render_context.rs index ccd97ff..4f7da18 100644 --- a/heatmap-client/src/canvas/render_context.rs +++ b/heatmap-client/src/canvas/render_context.rs @@ -197,7 +197,7 @@ pub async fn generate_render_context( web_sys::console::log_1(&"Done Generating State".into()); // Because this is a wasm application we cannot block on async calls so we instead send a message // back to the application handler when this function completes - let _ = event_loop_proxy.send_event(UserMessage::StateMessage(message)); + let _ = event_loop_proxy.send_event(UserMessage::StateMessage(Box::new(message))); } /// Contains a texture and buffer used to map a texture onto the CPU diff --git a/heatmap-client/src/canvas/state.rs b/heatmap-client/src/canvas/state.rs index 6dc60c1..ef2c4ce 100644 --- a/heatmap-client/src/canvas/state.rs +++ b/heatmap-client/src/canvas/state.rs @@ -85,7 +85,7 @@ impl State<'_> { render_context.export_texture_context = generate_export_texture(&render_context.device, new_size); - web_sys::console::log_1(&format!("New Size: {:?}", new_size).into()); + web_sys::console::log_1(&format!("New Size: {new_size:?}").into()); } } diff --git a/heatmap-client/src/ingest/request.rs b/heatmap-client/src/ingest/request.rs index 0c6d009..4699f1b 100644 --- a/heatmap-client/src/ingest/request.rs +++ b/heatmap-client/src/ingest/request.rs @@ -4,25 +4,21 @@ use heatmap_api::{HeatmapData, OutlineResponse}; pub async fn request(filter: heatmap_api::Filter) -> (HeatmapData, OutlineResponse) { let client = reqwest::Client::new(); - // Send a POST request to the service with the filter as a json payload - let data = client - .post("http://localhost:8000/heatmap") // TODO, some configuration mechanism for this - .json(&heatmap_api::HeatmapQuery { filter }) - .send() - .await - .expect("ERROR: Failed to recive data from post request"); - - // Deserialize response into json string - let str = data - .text() - .await - .expect("ERROR: Failed to deserialize Response into json str"); - - web_sys::console::log_2(&"Data text: ".into(), &format!("{:?}", str).into()); - - // Convert json string into a HeatmapData struct - let json_data: heatmap_api::HeatmapData = - serde_json::from_str(&str).expect("ERROR: Failed to deserialized json data"); + // Get the granule data from the service + let heatmap_data: HeatmapData = bincode::decode_from_slice( + &client + .post("http://localhost:8000/heatmap") // TODO, some configuration mechanism for this + .json(&heatmap_api::HeatmapQuery { filter }) + .send() + .await + .expect("ERROR: Failed to recive data from post request") + .bytes() + .await + .expect("ERROR: Failed to convert response into Bytes"), + bincode::config::standard(), + ) + .expect("ERROR: Failed to deserialized json data") + .0; // Get the outline data from the service // *** This should be broken out into its own function so we only get and mesh the world outline once *** @@ -40,5 +36,5 @@ pub async fn request(filter: heatmap_api::Filter) -> (HeatmapData, OutlineRespon // Deserialize the json into a HeatmapData struct web_sys::console::log_1(&"Data succesfully deserialized".into()); - (json_data, outline_data) + (heatmap_data, outline_data) } diff --git a/heatmap-service/Cargo.toml b/heatmap-service/Cargo.toml index 97703bd..e442175 100644 --- a/heatmap-service/Cargo.toml +++ b/heatmap-service/Cargo.toml @@ -10,7 +10,6 @@ actix-cors = "0.7.0" actix-http = "3.2.1" actix-web = "4.1.0" approx = "0.5.1" -base64 = "0.13.0" chrono = { version = "0.4.24", features = ["serde"] } config = "0.13.2" deadpool-redis = { version = "0.10.2", features = ["serde"] } @@ -18,9 +17,7 @@ derive_more = "0.99.17" dotenv = "0.15.0" env_logger = "0.9.0" futures-util = "0.3.28" -geo = "0.28.0" geojson = "0.24.1" -log = "0.4.22" pin-project = "1.0.12" redis = { version = "0.21.5", features = ["tokio-comp"] } serde = "1.0.163" @@ -29,3 +26,7 @@ serde_with = "2.0.0" heatmap-api = { path = "../heatmap-api" } rust-embed = "8.5.0" rayon = "1.10.0" +base64 = { workspace = true } +log = {workspace = true} +geo = {workspace = true} +bincode = { workspace = true } diff --git a/heatmap-service/Dockerfile b/heatmap-service/Dockerfile index 8fd02d3..56e6da2 100644 --- a/heatmap-service/Dockerfile +++ b/heatmap-service/Dockerfile @@ -1,6 +1,4 @@ -FROM rust:1.69 AS builder - -RUN update-ca-certificates +FROM rust:1.84 AS builder ENV USER=heatmap ENV UID=10001 @@ -16,10 +14,17 @@ RUN adduser \ WORKDIR /heatmap -COPY ./ . +COPY ./ ./ + +# Service config values +RUN <> ./.env +echo "CACHE_TTL=3600" >> ./.env +echo "HEATMAP_GEO_JSON_PATH=/heatmap/sat_data.geojson" >> ./.env +echo "GEO_JSON_PATH=/heatmap/sat_data.geojson" >> ./.env +EOF -RUN cargo update # required to fix issue with poorly specified dependencies for tokio-postgres -RUN cargo build --release +RUN cargo build --release --package heatmap-service FROM gcr.io/distroless/cc @@ -29,7 +34,11 @@ COPY --from=builder /etc/group /etc/group WORKDIR /heatmap COPY --from=builder /heatmap/target/release/heatmap-service ./ +COPY --from=builder /heatmap/heatmap-service/sat_data.geojson ./ +COPY --from=builder /heatmap/.env ./ USER heatmap:heatmap -CMD ["/heatmap/heatmap-service"] +EXPOSE 8000 + +CMD [ "/heatmap/heatmap-service" ] diff --git a/heatmap-service/run-service-docker.sh b/heatmap-service/run-service-docker.sh new file mode 100755 index 0000000..8030e4e --- /dev/null +++ b/heatmap-service/run-service-docker.sh @@ -0,0 +1,8 @@ +# Docker needs to be able to access heatmap-api +cd .. + +# Build docker image to run heatmap-service +sudo docker build -t heatmap-service -f heatmap-service/Dockerfile . + +# Start a container running the service +sudo docker run -p 8000:8000 heatmap-service diff --git a/heatmap-service/src/geo_assets.rs b/heatmap-service/src/geo_assets.rs index e59d79b..872cace 100644 --- a/heatmap-service/src/geo_assets.rs +++ b/heatmap-service/src/geo_assets.rs @@ -14,16 +14,24 @@ impl GeoAssets { pub fn from_config(config: Config) -> Self { Self { heatmap_features: Granule::from_feature_collection( - config.heatmap_geo_json_path.try_into().unwrap(), + config + .heatmap_geo_json_path + .try_into() + .expect("Failed to get sat_data.geojson"), ) - .unwrap(), + .expect("Failed to convert sat_data.geojson to Granules"), outline_features: Granule::from_feature_collection( - std::str::from_utf8(Assets::get("outline.geojson").unwrap().data.as_ref()) - .unwrap() - .parse::() - .unwrap() - .try_into() - .unwrap(), + std::str::from_utf8( + Assets::get("outline.geojson") + .expect("failed to get outline.geojson") + .data + .as_ref(), + ) + .expect("Failed to convert outline to str") + .parse::() + .expect("Failed to parse outline GeoJson") + .try_into() + .expect("Failed to convert outline to a FeatureCollection"), ) .unwrap(), } diff --git a/heatmap-service/src/heatmap_data.rs b/heatmap-service/src/heatmap_data.rs index cfa9f6f..96394bc 100644 --- a/heatmap-service/src/heatmap_data.rs +++ b/heatmap-service/src/heatmap_data.rs @@ -1,8 +1,9 @@ +use bincode::{Decode, Encode}; use serde::{Deserialize, Serialize}; use crate::granule::Granule; -#[derive(Deserialize, Serialize, Debug, PartialEq)] +#[derive(Serialize, Deserialize, Decode, Encode, Debug, PartialEq)] pub struct HeatmapData { pub length: i32, pub positions: Vec>, diff --git a/heatmap-service/src/heatmap_response.rs b/heatmap-service/src/heatmap_response.rs index 4266910..3a4260b 100644 --- a/heatmap-service/src/heatmap_response.rs +++ b/heatmap-service/src/heatmap_response.rs @@ -1,10 +1,11 @@ +use bincode::{Decode, Encode}; use chrono::NaiveDate; use rayon::prelude::*; use serde::{Deserialize, Serialize}; use crate::{granule::Granule, heatmap_data::HeatmapData}; -#[derive(Deserialize, Serialize, Debug, PartialEq)] +#[derive(Serialize, Deserialize, Decode, Encode, Debug, PartialEq)] pub struct HeatmapResponse { pub data: HeatmapData, } diff --git a/heatmap-service/src/main.rs b/heatmap-service/src/main.rs index 76f26bb..e45fc34 100644 --- a/heatmap-service/src/main.rs +++ b/heatmap-service/src/main.rs @@ -26,6 +26,8 @@ mod redis; #[actix_web::main] async fn main() -> std::io::Result<()> { + println!("Service starting up"); + dotenv::dotenv().ok(); std::env::set_var("RUST_LOG", "actix_web=info"); @@ -50,10 +52,12 @@ async fn main() -> std::io::Result<()> { let geo_assets = GeoAssets::from_config(config.clone()); + println!("Service Running!"); + HttpServer::new(move || { let cors = Cors::default() .allowed_origin("https://asfadmin.github.io") // The client is hosted on github pages - .allowed_origin("localhost") // Allowed for debug purposes + .allowed_origin("http://localhost:8080") // Allowed for debug purposes .allowed_methods(vec!["GET", "POST"]) .allowed_headers(vec![header::AUTHORIZATION, header::ACCEPT]) .allowed_header(header::CONTENT_TYPE) diff --git a/heatmap-service/src/middleware.rs b/heatmap-service/src/middleware.rs index dbed2f7..b9f59f8 100644 --- a/heatmap-service/src/middleware.rs +++ b/heatmap-service/src/middleware.rs @@ -16,6 +16,7 @@ use actix_web::{ web::{Bytes, BytesMut, Data}, Error, HttpMessage, HttpResponse, }; +use base64::{engine::general_purpose, Engine as _}; use futures_util::{future::LocalBoxFuture, stream::StreamExt}; use redis::AsyncCommands; use serde::{Deserialize, Serialize}; @@ -147,7 +148,11 @@ where let response = HttpResponse::Ok() .content_type("application/json") .append_header(encoding) - .body(base64::decode(response).actix_map_result()?) + .body( + general_purpose::STANDARD + .decode(response) + .actix_map_result()?, + ) .map_into_right_body(); return Ok(ServiceResponse::new(request, response)); @@ -281,7 +286,7 @@ impl PinnedDrop for BodyCacher { fn drop(self: Pin<&mut Self>) { if let Some(caching_information) = self.caching_information.clone() { let redis_pool_wrapped = self.redis_pool.clone(); - let body = base64::encode(&self.body_accum); + let body = general_purpose::STANDARD.encode(&self.body_accum); rt::spawn(async move { // there isnt much we can do for proper error handling here :/ diff --git a/heatmap-service/src/query.rs b/heatmap-service/src/query.rs index 7ee0e14..da0bcba 100644 --- a/heatmap-service/src/query.rs +++ b/heatmap-service/src/query.rs @@ -1,4 +1,5 @@ use actix_web::{ + body::BoxBody, web::{Data, Json}, Error, HttpRequest, HttpResponse, }; @@ -38,7 +39,11 @@ async fn heatmap_query( let response_data = HeatmapResponse::from_geojson(query.filter, feature_collection); - let response = HttpResponse::Ok().json(&response_data); + let response = HttpResponse::Ok() + .message_body(BoxBody::new( + bincode::encode_to_vec(&response_data, bincode::config::standard()).unwrap(), + )) + .expect("Failed to create HttpResponse for heatmap granules"); if let Some(redis_pool) = redis_wrapped { redis::cache_put( diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 5d56faf..3277d11 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "nightly" +channel = "nightly-2025-02-01"