diff --git a/Cargo.lock b/Cargo.lock index a889570..4f41b0e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "ab_glyph" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04a9283dace1c41c265496614998d5b9c4a97b3eb770e804f007c5144bf03f2b" +checksum = "4dcdbc68024b653943864d436fe8a24b028095bc1cf91a8926f8241e4aaffe59" dependencies = [ "ab_glyph_rasterizer", "owned_ttf_parser", @@ -49,14 +49,14 @@ dependencies = [ [[package]] name = "alsa" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5915f52fe2cf65e83924d037b6c5290b7cee097c6b5c8700746e6168a343fd6b" +checksum = "f5634739325616a86b999bb65b49e1e502f179596145fd47b60e00b687782cea" dependencies = [ "alsa-sys", "bitflags", "libc", - "nix 0.23.1", + "nix 0.24.2", ] [[package]] @@ -145,6 +145,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "base-x" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" + [[package]] name = "bindgen" version = "0.59.2" @@ -193,9 +199,9 @@ checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] name = "bumpalo" -version = "3.11.0" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "bytemuck" @@ -300,9 +306,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.0.15" +version = "4.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bf8832993da70a4c6d13c581f4463c2bdda27b9bf1c5498dc4365543abe6d6f" +checksum = "335867764ed2de42325fafe6d18b8af74ba97ee0c590fa016f157535b42ab04b" dependencies = [ "atty", "bitflags", @@ -317,9 +323,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.0.13" +version = "4.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f169caba89a7d512b5418b09864543eeb4d497416c917d7137863bd2076ad" +checksum = "16a1b0f6422af32d5da0c58e2703320f379216ee70198241c84173a8c5ac28f3" dependencies = [ "heck", "proc-macro-error", @@ -494,9 +500,9 @@ dependencies = [ [[package]] name = "cpal" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d466b47cf0ea4100186a7c12d7d0166813dda7cf648553554c9c39c6324841b" +checksum = "e73413ddcb69c398125f5529714492e070c64c6a090ad5b01d8c082b320a0809" dependencies = [ "alsa", "core-foundation-sys", @@ -507,7 +513,7 @@ dependencies = [ "mach", "ndk 0.7.0", "ndk-context", - "nix 0.23.1", + "nix 0.25.0", "oboe", "once_cell", "parking_lot", @@ -601,6 +607,12 @@ dependencies = [ "syn", ] +[[package]] +name = "discard" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" + [[package]] name = "dispatch" version = "0.2.0" @@ -656,7 +668,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "wgpu 0.13.1", + "wgpu", "winit", ] @@ -683,7 +695,7 @@ dependencies = [ "pollster", "tracing", "type-map", - "wgpu 0.13.1", + "wgpu", "winit", ] @@ -770,12 +782,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - [[package]] name = "flate2" version = "1.0.24" @@ -886,9 +892,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if", "js-sys", @@ -1110,6 +1116,12 @@ dependencies = [ "web-sys", ] +[[package]] +name = "itoa" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" + [[package]] name = "jni" version = "0.19.0" @@ -1150,15 +1162,13 @@ dependencies = [ [[package]] name = "katabastird" -version = "1.0.0" +version = "1.6.0" dependencies = [ "clap", "eframe", "egui", "egui_extras", - "naga 0.10.0", "rodio", - "wgpu 0.14.0", ] [[package]] @@ -1336,7 +1346,7 @@ dependencies = [ "libc", "log", "wasi", - "windows-sys", + "windows-sys 0.36.1", ] [[package]] @@ -1359,27 +1369,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "naga" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "262d2840e72dbe250e8cf2f522d080988dfca624c4112c096238a4845f591707" -dependencies = [ - "bit-set", - "bitflags", - "codespan-reporting", - "hexf-parse", - "indexmap", - "log", - "num-traits", - "petgraph", - "rustc-hash", - "spirv", - "termcolor", - "thiserror", - "unicode-xid", -] - [[package]] name = "ndk" version = "0.6.0" @@ -1488,19 +1477,6 @@ dependencies = [ "memoffset", ] -[[package]] -name = "nix" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6" -dependencies = [ - "bitflags", - "cc", - "cfg-if", - "libc", - "memoffset", -] - [[package]] name = "nix" version = "0.24.2" @@ -1513,6 +1489,20 @@ dependencies = [ "memoffset", ] +[[package]] +name = "nix" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e322c04a9e3440c327fca7b6c8a63e6890a32fa2ad689db972425f07e0d22abb" +dependencies = [ + "autocfg", + "bitflags", + "cfg-if", + "libc", + "memoffset", + "pin-utils", +] + [[package]] name = "nohash-hasher" version = "0.2.0" @@ -1664,9 +1654,9 @@ dependencies = [ [[package]] name = "owned_ttf_parser" -version = "0.15.2" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e6affeb1632d6ff6a23d2cd40ffed138e82f1532571a26f527c8a284bb2fbb" +checksum = "4665508572151759e8d60404e20dc096ef93a99801a05ac2ac6e43bf5b4ca187" dependencies = [ "ttf-parser", ] @@ -1683,15 +1673,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" +checksum = "4dc9e0dc2adc1c69d09143aff38d3d30c5c3f0df0dad82e6d25547af174ebec0" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-sys", + "windows-sys 0.42.0", ] [[package]] @@ -1706,22 +1696,18 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" -[[package]] -name = "petgraph" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143" -dependencies = [ - "fixedbitset", - "indexmap", -] - [[package]] name = "pin-project-lite" version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + [[package]] name = "pkg-config" version = "0.3.25" @@ -1783,9 +1769,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.46" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ "unicode-ident", ] @@ -1878,6 +1864,21 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver", +] + +[[package]] +name = "ryu" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" + [[package]] name = "safe_arch" version = "0.5.2" @@ -1910,9 +1911,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "sctk-adwaita" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04b7c47a572f73de28bee5b5060d085b42b6ce1e4ee2b49c956ea7b25e94b6f0" +checksum = "61270629cc6b4d77ec1907db1033d5c2e1a404c412743621981a871dc9c12339" dependencies = [ "crossfont", "log", @@ -1921,22 +1922,48 @@ dependencies = [ ] [[package]] -name = "serde" -version = "1.0.145" +name = "semver" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" + +[[package]] +name = "serde" +version = "1.0.147" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" [[package]] name = "serde_derive" -version = "1.0.145" +version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" +checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" dependencies = [ "proc-macro2", "quote", "syn", ] +[[package]] +name = "serde_json" +version = "1.0.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" +dependencies = [ + "itoa", + "ryu", + "serde", +] + [[package]] name = "servo-fontconfig" version = "0.5.1" @@ -1958,6 +1985,21 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "sha1" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" +dependencies = [ + "sha1_smol", +] + +[[package]] +name = "sha1_smol" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" + [[package]] name = "shared_library" version = "0.1.9" @@ -2040,16 +2082,53 @@ dependencies = [ ] [[package]] -name = "static_assertions" -version = "1.1.0" +name = "stdweb" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" +dependencies = [ + "discard", + "rustc_version", + "stdweb-derive", + "stdweb-internal-macros", + "stdweb-internal-runtime", + "wasm-bindgen", +] [[package]] -name = "stdweb" -version = "0.1.3" +name = "stdweb-derive" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef5430c8e36b713e13b48a9f709cc21e046723fe44ce34587b73a830203b533e" +checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "serde_derive", + "syn", +] + +[[package]] +name = "stdweb-internal-macros" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" +dependencies = [ + "base-x", + "proc-macro2", + "quote", + "serde", + "serde_derive", + "serde_json", + "sha1", + "syn", +] + +[[package]] +name = "stdweb-internal-runtime" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" [[package]] name = "str-buf" @@ -2065,9 +2144,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.102" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1" +checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" dependencies = [ "proc-macro2", "quote", @@ -2174,9 +2253,9 @@ dependencies = [ [[package]] name = "ttf-parser" -version = "0.15.2" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b3e06c9b9d80ed6b745c7159c40b311ad2916abb34a49e9be2653b90db0d8dd" +checksum = "375812fa44dab6df41c195cd2f7fecb488f6c09fbaafb62807488cefab642bff" [[package]] name = "type-map" @@ -2451,38 +2530,16 @@ dependencies = [ "arrayvec 0.7.2", "js-sys", "log", - "naga 0.9.0", + "naga", "parking_lot", "raw-window-handle 0.4.3", "smallvec", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "wgpu-core 0.13.2", - "wgpu-hal 0.13.2", - "wgpu-types 0.13.2", -] - -[[package]] -name = "wgpu" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2272b17bffc8a0c7d53897435da7c1db587c87d3a14e8dae9cdb8d1d210fc0f" -dependencies = [ - "arrayvec 0.7.2", - "js-sys", - "log", - "naga 0.10.0", - "parking_lot", - "raw-window-handle 0.5.0", - "smallvec", - "static_assertions", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "wgpu-core 0.14.0", - "wgpu-hal 0.14.0", - "wgpu-types 0.14.0", + "wgpu-core", + "wgpu-hal", + "wgpu-types", ] [[package]] @@ -2499,39 +2556,15 @@ dependencies = [ "copyless", "fxhash", "log", - "naga 0.9.0", + "naga", "parking_lot", "profiling", "raw-window-handle 0.4.3", "smallvec", "thiserror", "web-sys", - "wgpu-hal 0.13.2", - "wgpu-types 0.13.2", -] - -[[package]] -name = "wgpu-core" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73d14cad393054caf992ee02b7da6a372245d39a484f7461c1f44f6f6359bd28" -dependencies = [ - "arrayvec 0.7.2", - "bit-vec", - "bitflags", - "cfg_aliases", - "codespan-reporting", - "fxhash", - "log", - "naga 0.10.0", - "parking_lot", - "profiling", - "raw-window-handle 0.5.0", - "smallvec", - "thiserror", - "web-sys", - "wgpu-hal 0.14.0", - "wgpu-types 0.14.0", + "wgpu-hal", + "wgpu-types", ] [[package]] @@ -2559,7 +2592,7 @@ dependencies = [ "libloading", "log", "metal", - "naga 0.9.0", + "naga", "objc", "parking_lot", "profiling", @@ -2569,46 +2602,7 @@ dependencies = [ "thiserror", "wasm-bindgen", "web-sys", - "wgpu-types 0.13.2", - "winapi", -] - -[[package]] -name = "wgpu-hal" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdae6a80dbc725343f02f854b310b37190be946aeea65e9d83afaa7d840ebaac" -dependencies = [ - "android_system_properties", - "arrayvec 0.7.2", - "ash", - "bit-set", - "bitflags", - "block", - "core-graphics-types", - "d3d12", - "foreign-types 0.3.2", - "fxhash", - "glow", - "gpu-alloc", - "gpu-descriptor", - "js-sys", - "khronos-egl", - "libloading", - "log", - "metal", - "naga 0.10.0", - "objc", - "parking_lot", - "profiling", - "range-alloc", - "raw-window-handle 0.5.0", - "renderdoc-sys", - "smallvec", - "thiserror", - "wasm-bindgen", - "web-sys", - "wgpu-types 0.14.0", + "wgpu-types", "winapi", ] @@ -2621,15 +2615,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "wgpu-types" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28fb86c1909233c804aa79b7dd1ad06ebd979b2a465e3e980582db0ea9e69f3f" -dependencies = [ - "bitflags", -] - [[package]] name = "widestring" version = "0.5.1" @@ -2702,6 +2687,27 @@ dependencies = [ "windows_x86_64_msvc 0.36.1", ] +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.0", + "windows_i686_gnu 0.42.0", + "windows_i686_msvc 0.42.0", + "windows_x86_64_gnu 0.42.0", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" + [[package]] name = "windows_aarch64_msvc" version = "0.36.1" @@ -2714,6 +2720,12 @@ version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2623277cb2d1c216ba3b578c0f3cf9cdebeddb6e66b1b218bb33596ea7769c3a" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" + [[package]] name = "windows_i686_gnu" version = "0.36.1" @@ -2726,6 +2738,12 @@ version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3925fd0b0b804730d44d4b6278c50f9699703ec49bcd628020f46f4ba07d9e1" +[[package]] +name = "windows_i686_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" + [[package]] name = "windows_i686_msvc" version = "0.36.1" @@ -2738,6 +2756,12 @@ version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce907ac74fe331b524c1298683efbf598bb031bc84d5e274db2083696d07c57c" +[[package]] +name = "windows_i686_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" + [[package]] name = "windows_x86_64_gnu" version = "0.36.1" @@ -2750,6 +2774,18 @@ version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2babfba0828f2e6b32457d5341427dcbb577ceef556273229959ac23a10af33d" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" + [[package]] name = "windows_x86_64_msvc" version = "0.36.1" @@ -2762,6 +2798,12 @@ version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4dd6dc7df2d84cf7b33822ed5b86318fb1781948e9663bacd047fc9dd52259d" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" + [[package]] name = "winit" version = "0.27.4" @@ -2791,7 +2833,7 @@ dependencies = [ "wayland-client", "wayland-protocols", "web-sys", - "windows-sys", + "windows-sys 0.36.1", "x11-dl", ] diff --git a/Cargo.toml b/Cargo.toml index 65357c1..2c5af59 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,16 +1,20 @@ [package] name = "katabastird" -version = "1.0.0" +version = "1.6.0" edition = "2021" rust-version = "1.61" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +description = "A simple graphical countdown timer that is configured and launched from the commandline." +repository = "https://gitlab.com/nebkor/katabastird" +readme = "README.md" +keywords = ["unix", "commandline", "timer", "gui", "cli"] +license-file = "LICENSE.md" [dependencies] clap = { version = "4", features = ["derive", "env", "unicode", "suggestions", "usage"] } eframe = { version = "0.19", features = ["wgpu"] } -egui = { version = "0.19", features = ["bytemuck"] } +egui = { version = "0.19", features = ["default"] } egui_extras = "0.19" -naga = { version = "0.10", features = ["spv-out", "wgsl-out", "wgsl-in"] } +# naga = { version = "0.10", features = ["spv-out", "wgsl-out", "wgsl-in"] } rodio = { version = "0.16" } -wgpu = { version = "0.14", features = ["naga", "spirv"] } +# wgpu = { version = "0.14", features = ["naga", "spirv"] } diff --git a/README.md b/README.md index 09d4b3a..2daf69a 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,20 @@ Katabastird is a simple countdown timer that is configured and launched from the Usage: katabastird [OPTIONS] Options: - --hours Hours to count down [default: 0] - -m, --minutes Minutes to count down [default: 0] - -s, --seconds Seconds to count down [default: 0] + -h, --hours Hours to count down + -m, --minutes Minutes to count down + -s, --seconds Seconds to count down -a, --alarm Audio file to play at the end of the countdown + -A -r, --running Begin countdown immediately -u, --count-up Count up from zero, actually -p, --predator Use the Predator font - -h, --help Print help information + -H, --help Print this help -V, --version Print version information ``` -![a Predator's view of the timer while it's paused](./predator_timer_small.png) +![a Predator's view of the timer while it's paused](./predator_timer_small.png "a Predator's view of the timer while it's paused") + +"[Katabasis](https://en.wikipedia.org/wiki/Katabasis)" is the descent into the Underworld. + +All content is licensed under the Chaos License; see [LICENSE.md](./LICENSE.md) for details. diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..810ee4e --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +1.6 diff --git a/VERSIONING.md b/VERSIONING.md new file mode 100644 index 0000000..74b3ab2 --- /dev/null +++ b/VERSIONING.md @@ -0,0 +1,32 @@ +# Golden Versioning + +```katabastird``` is versioned under a scheme I call "goldver", as an homage to the +vastly inferior [semver](https://semver.org). + +## What does "goldver" mean? + +When projects are versioned with goldver, the first version is "1". Note that it +is not "1.0", or, "1.0-prealpha-release-preview", or anything nonsensical like +that. As new versions are released, decimals from *phi*, the [Golden +Ratio](https://en.wikipedia.org/wiki/Golden_ratio), are appended after an +initial decimal point. So the second released version will be "1.6", the third +would be "1.61", etc., and on until perfection is asymptotically approached as +the number of released versions goes to infinity. + +## Wait, didn't Donald Knuth do this? + +No! He uses [pi for TeX and e for MetaFont](https://texfaq.org/FAQ-TeXfuture), +obviously COMPLETELY different. + +## Ok. + +Cool. + +## What version is katabastird now? + +Canonically, see the ```VERSION``` file. Heretically, once there have been +at least three releases, the version string in the ```Cargo.toml``` file will +always be of the form "1.6.x", where *x* is at least one digit long, starting +with "1". Each subsequent release will append the next digit of *phi* to +*x*. The number of releases can be calculated by counting the number of digits +in *x* and adding 2 to that. diff --git a/src/timer/gui.rs b/src/timer/gui.rs index 0809d60..35960d0 100644 --- a/src/timer/gui.rs +++ b/src/timer/gui.rs @@ -6,18 +6,14 @@ use egui_extras::{Size, StripBuilder}; use super::state::NextTimerState; use crate::util::display_digits; -pub(crate) fn two_button( +pub(crate) fn two_rows( ui: &mut Ui, - button1: RichText, - button2: RichText, - signal1: NextTimerState, - signal2: NextTimerState, + buttons: &[(RichText, NextTimerState)], sender: Sender, remaining: Duration, digit_color: Color32, digit_size: f32, ) { - let sender2 = sender.clone(); StripBuilder::new(ui) .size(Size::relative(0.33333)) .size(Size::remainder()) @@ -25,19 +21,16 @@ pub(crate) fn two_button( .vertical(|mut strip| { strip.strip(|pstrip| { pstrip - .sizes(Size::remainder(), 2) + .sizes(Size::remainder(), buttons.len()) .cell_layout(Layout::centered_and_justified(Direction::TopDown)) .horizontal(|mut pstrip| { - pstrip.cell(|ui| { - if ui.button(button1).clicked() { - sender.send(signal1).unwrap(); - } - }); - pstrip.cell(|ui| { - if ui.button(button2).clicked() { - sender2.send(signal2).unwrap(); - } - }); + for (button, signal) in buttons.iter() { + pstrip.cell(|ui| { + if ui.button(button.clone()).clicked() { + sender.send(*signal).unwrap(); + } + }); + } }); }); @@ -45,26 +38,21 @@ pub(crate) fn two_button( }); } -pub(crate) fn one_button( +pub(crate) fn one_row( ui: &mut Ui, - button1: RichText, - signal1: NextTimerState, + buttons: &[(RichText, NextTimerState)], sender: Sender, - remaining: Duration, - digit_color: Color32, - digit_size: f32, ) { StripBuilder::new(ui) - .size(Size::relative(0.33333)) - .size(Size::remainder()) - .cell_layout(Layout::centered_and_justified(Direction::LeftToRight)) - .vertical(|mut strip| { - strip.cell(|ui| { - if ui.button(button1).clicked() { - sender.send(signal1).unwrap(); - } - }); - - display_digits(&mut strip, remaining, digit_color, digit_size); + .sizes(Size::remainder(), buttons.len()) + .cell_layout(Layout::centered_and_justified(Direction::TopDown)) + .horizontal(|mut strip| { + for (button, signal) in buttons.iter() { + strip.cell(|ui| { + if ui.button(button.clone()).clicked() { + sender.send(*signal).unwrap(); + } + }); + } }); } diff --git a/src/timer/mod.rs b/src/timer/mod.rs index 5535e58..ffebd1f 100644 --- a/src/timer/mod.rs +++ b/src/timer/mod.rs @@ -2,8 +2,7 @@ use std::sync::mpsc::channel; use std::time::{Duration, Instant}; use clap::Parser; -use egui::{Color32, FontId, Layout, RichText, Ui}; -use egui_extras::{Size, StripBuilder}; +use egui::{Color32, FontId, RichText, Ui}; use crate::{cli::Cli, util::*, AIRHORN, DIGIT_FACTOR, MAX_REPAINT, PREDATOR_FONT, TEXT_FACTOR}; @@ -68,17 +67,18 @@ impl Timer { ctx.egui_ctx.set_fonts(fonts); } ctx.egui_ctx.request_repaint_after(MAX_REPAINT); + let updated = Instant::now(); let mut timer = Timer { duration, direction, state: TimerState::Unstarted, - tstart: Instant::now(), + tstart: updated, alarm, }; if cli.running { let cs = ChronoState { remaining: duration, - updated: Instant::now(), + updated, }; timer.state = TimerState::Running(cs); @@ -93,20 +93,16 @@ impl Timer { .color(Color32::WHITE) .background_color(Color32::LIGHT_GREEN); - StripBuilder::new(ui) - .size(Size::remainder()) - .cell_layout(Layout::centered_and_justified(egui::Direction::TopDown)) - .horizontal(|mut strip| { - strip.cell(|ui| { - if ui.button(start).clicked() { - let dur = self.duration; - self.state = TimerState::Running(ChronoState { - updated: Instant::now(), - remaining: dur, - }); - } - }); + let (sender, rx) = channel(); + one_row(ui, &[(start, NextTimerState::Running)], sender); + + if rx.recv().is_ok() { + let dur = self.duration; + self.state = TimerState::Running(ChronoState { + updated: Instant::now(), + remaining: dur, }); + } } fn running(&mut self, ui: &mut Ui, size: f32, cs: ChronoState) { @@ -118,9 +114,9 @@ impl Timer { let elapsed = Instant::now() - cs.updated; let remaining = cs.remaining.saturating_sub(elapsed); if remaining.is_zero() { - if let Some(alarm_file) = &self.alarm { - let alarm_file = alarm_file.to_owned(); - std::thread::spawn(move || alarm(alarm_file)); + if let Some(alarm_sound) = &self.alarm { + let alarm_sound = alarm_sound.to_owned(); + std::thread::spawn(move || alarm(alarm_sound)); } self.state = TimerState::Finished; return; @@ -135,15 +131,14 @@ impl Timer { }; let color = Color32::DARK_GRAY; let tsize = size * DIGIT_FACTOR; - one_button( + two_rows( ui, - text, - state::NextTimerState::Paused, + &[(text, state::NextTimerState::Paused)], sender, remaining, color, tsize, - ) + ); } let cs = ChronoState { @@ -185,12 +180,12 @@ impl Timer { CountDirection::Up => self.duration - remaining, }; - two_button( + two_rows( ui, - resume, - reset, - NextTimerState::Running, - NextTimerState::Unstarted, + &[ + (resume, NextTimerState::Running), + (reset, NextTimerState::Unstarted), + ], sender, remaining, color, @@ -237,17 +232,20 @@ impl Timer { }; let (sender, rx) = channel(); - one_button( + two_rows( ui, - reset, - NextTimerState::Unstarted, + &[(reset, NextTimerState::Running)], // technically we can send anything but let's try not to be misleading sender, remaining, color, vsize * DIGIT_FACTOR, ); if rx.recv().is_ok() { - self.state = TimerState::Unstarted; + let cs = ChronoState { + remaining: self.duration, + updated: Instant::now(), + }; + self.state = TimerState::Running(cs); } } }