diff --git a/.helix/languages.toml b/.helix/languages.toml new file mode 100644 index 0000000..aa8f63c --- /dev/null +++ b/.helix/languages.toml @@ -0,0 +1,3 @@ +[language-server.rust-analyzer] +config = { cargo = { features = "all" } } + diff --git a/Cargo.lock b/Cargo.lock index 5906449..3e45c02 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -31,7 +31,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", - "getrandom", + "getrandom 0.3.4", "once_cell", "version_check", "zerocopy", @@ -39,9 +39,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] @@ -54,9 +54,9 @@ checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" [[package]] name = "aligned" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "377e4c0ba83e4431b10df45c1d4666f178ea9c552cac93e60c3a88bf32785923" +checksum = "ee4508988c62edf04abd8d92897fca0c2995d907ce1dfeaf369dac3716a40685" dependencies = [ "as-slice", ] @@ -72,21 +72,21 @@ dependencies = [ [[package]] name = "alsa" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c88dbbce13b232b26250e1e2e6ac18b6a891a646b8148285036ebce260ac5c3" +checksum = "812947049edcd670a82cd5c73c3661d2e58468577ba8489de58e1a73c04cbd5d" dependencies = [ "alsa-sys", - "bitflags 2.10.0", + "bitflags 2.11.0", "cfg-if", "libc", ] [[package]] name = "alsa-sys" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8fee663d06c4e303404ef5f40488a53e062f89ba8bfed81f42325aafad1527" +checksum = "ad7569085a265dd3f607ebecce7458eaab2132a84393534c95b18dcbc3f31e04" dependencies = [ "libc", "pkg-config", @@ -99,7 +99,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" dependencies = [ "android-properties", - "bitflags 2.10.0", + "bitflags 2.11.0", "cc", "cesu8", "jni", @@ -139,9 +139,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.100" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" [[package]] name = "arbitrary" @@ -222,9 +222,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.13.3" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497c00e0fd83a72a79a39fcbd8e3e2f055d6f6c7e025f3b3d91f4f8e76527fb8" +checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a" dependencies = [ "async-task", "concurrent-queue", @@ -247,16 +247,16 @@ dependencies = [ "futures-lite", "parking", "polling", - "rustix 1.1.2", + "rustix 1.1.4", "slab", "windows-sys 0.61.2", ] [[package]] name = "async-lock" -version = "3.4.1" +version = "3.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd03604047cee9b6ce9de9f70c6cd540a0520c813cbd49bae61f33ab80ed1dc" +checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" dependencies = [ "event-listener", "event-listener-strategy", @@ -278,7 +278,7 @@ dependencies = [ "cfg-if", "event-listener", "futures-lite", - "rustix 1.1.2", + "rustix 1.1.4", ] [[package]] @@ -304,7 +304,7 @@ dependencies = [ "cfg-if", "futures-core", "futures-io", - "rustix 1.1.2", + "rustix 1.1.4", "signal-hook-registry", "slab", "windows-sys 0.61.2", @@ -354,7 +354,7 @@ dependencies = [ "num-traits", "pastey", "rayon", - "thiserror 2.0.17", + "thiserror 2.0.18", "v_frame", "y4m", ] @@ -375,9 +375,9 @@ dependencies = [ [[package]] name = "avif-serialize" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47c8fbc0f831f4519fe8b810b6a7a91410ec83031b8233f730a0480029f6a23f" +checksum = "375082f007bd67184fb9c0374614b29f9aaa604ec301635f72338bb65386a53d" dependencies = [ "arrayvec", ] @@ -414,18 +414,18 @@ checksum = "1e4b40c7323adcfc0a41c4b88143ed58346ff65a288fc144329c5c45e05d70c6" [[package]] name = "bitfield" -version = "0.19.3" +version = "0.19.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bf79f42d21f18b5926a959280215903e659760da994835d27c3a0c5ff4f898f" +checksum = "21ba6517c6b0f2bf08be60e187ab64b038438f22dd755614d8fe4d4098c46419" dependencies = [ "bitfield-macros", ] [[package]] name = "bitfield-macros" -version = "0.19.3" +version = "0.19.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6115af052c7914c0cbb97195e5c72cb61c511527250074f5c041d1048b0d8b16" +checksum = "f48d6ace212fdf1b45fd6b566bb40808415344642b76c3224c07c8df9da81e97" dependencies = [ "proc-macro2", "quote", @@ -440,9 +440,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" +checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" [[package]] name = "bitstream-io" @@ -474,7 +474,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" dependencies = [ - "objc2 0.6.3", + "objc2 0.6.4", ] [[package]] @@ -498,15 +498,15 @@ checksum = "f4ad8f11f288f48ca24471bbd51ac257aaeaaa07adae295591266b792902ae64" [[package]] name = "bumpalo" -version = "3.19.0" +version = "3.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" [[package]] name = "bytemuck" -version = "1.24.0" +version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fbdf580320f38b612e485521afda1ee26d10cc9884efaaa750d383e13e3c5f4" +checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" dependencies = [ "bytemuck_derive", ] @@ -530,9 +530,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.10.1" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "calloop" @@ -540,7 +540,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "log", "polling", "rustix 0.38.44", @@ -550,13 +550,13 @@ dependencies = [ [[package]] name = "calloop" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb9f6e1368bd4621d2c86baa7e37de77a938adf5221e5dd3d6133340101b309e" +checksum = "4dbf9978365bac10f54d1d4b04f7ce4427e51f71d61f2fe15e3fed5166474df7" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "polling", - "rustix 1.1.2", + "rustix 1.1.4", "slab", "tracing", ] @@ -579,17 +579,17 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa" dependencies = [ - "calloop 0.14.3", - "rustix 1.1.2", + "calloop 0.14.4", + "rustix 1.1.4", "wayland-backend", "wayland-client", ] [[package]] name = "cc" -version = "1.2.41" +version = "1.2.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac9fe6cdbb24b6ade63616c0a0688e45bb56732262c158df3c0c4bea4ca47cb7" +checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423" dependencies = [ "find-msvc-tools", "jobserver", @@ -617,9 +617,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.42" +version = "0.4.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" +checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" dependencies = [ "iana-time-zone", "num-traits", @@ -657,11 +657,11 @@ dependencies = [ [[package]] name = "clipboard_x11" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4274ea815e013e0f9f04a2633423e14194e408a0576c943ce3d14ca56c50031c" +checksum = "bd63e33452ffdafd39924c4f05a5dd1e94db646c779c6bd59148a3d95fff5ad4" dependencies = [ - "thiserror 1.0.69", + "thiserror 2.0.18", "x11rb", ] @@ -701,6 +701,26 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "console_log" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be8aed40e4edbf4d3b4431ab260b63fdc40f5780a4766824329ea0f1eefe3c0f" +dependencies = [ + "log", + "web-sys", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -740,19 +760,6 @@ dependencies = [ "libc", ] -[[package]] -name = "core-graphics" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" -dependencies = [ - "bitflags 2.10.0", - "core-foundation 0.10.1", - "core-graphics-types 0.2.0", - "foreign-types", - "libc", -] - [[package]] name = "core-graphics-types" version = "0.1.3" @@ -770,7 +777,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "core-foundation 0.10.1", "libc", ] @@ -795,11 +802,11 @@ dependencies = [ [[package]] name = "coreaudio-rs" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aae284fbaf7d27aa0e292f7677dfbe26503b0d555026f702940805a630eac17" +checksum = "d15c3c3cee7c087938f7ad1c3098840b3ef1f1bdc7f6e496336c3b1e7a6f3914" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.11.0", "libc", "objc2-audio-toolbox", "objc2-core-audio", @@ -812,7 +819,7 @@ name = "cosmic-text" version = "0.15.0" source = "git+https://github.com/pop-os/cosmic-text.git?rev=a07a6190548c8e40a55f6b7761387047ff1bf6ff#a07a6190548c8e40a55f6b7761387047ff1bf6ff" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "fontdb", "harfrust", "linebender_resource_handle", @@ -832,9 +839,9 @@ dependencies = [ [[package]] name = "cpal" -version = "0.17.1" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b1f9c7312f19fc2fa12fd7acaf38de54e8320ba10d1a02dcbe21038def51ccb" +checksum = "d8942da362c0f0d895d7cac616263f2f9424edc5687364dfd1d25ef7eba506d7" dependencies = [ "alsa", "coreaudio-rs", @@ -847,7 +854,7 @@ dependencies = [ "ndk-context", "num-derive", "num-traits", - "objc2 0.6.3", + "objc2 0.6.4", "objc2-audio-toolbox", "objc2-avf-audio", "objc2-core-audio", @@ -914,9 +921,9 @@ dependencies = [ [[package]] name = "ctor-lite" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f791803201ab277ace03903de1594460708d2d54df6053f2d9e82f592b19e3b" +checksum = "e162d0c2e2068eb736b71e5597eff0b9944e6b973cd9f37b6a288ab9bf20e300" [[package]] name = "cursor-icon" @@ -938,21 +945,21 @@ checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" [[package]] name = "dispatch2" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.6.2", "libc", - "objc2 0.6.3", + "objc2 0.6.4", ] [[package]] name = "dlib" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" +checksum = "ab8ecd87370524b461f8557c119c405552c396ed91fc0a8eec68679eab26f94a" dependencies = [ "libloading", ] @@ -985,9 +992,9 @@ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "endi" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" +checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099" [[package]] name = "enumflags2" @@ -1064,9 +1071,9 @@ dependencies = [ [[package]] name = "euclid" -version = "0.22.11" +version = "0.22.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad9cdb4b747e485a12abb0e6566612956c7a1bafa3bdb8d682c5b6d403589e48" +checksum = "f1a05365e3b1c6d1650318537c7460c6923f1abdd272ad6842baa2b509957a06" dependencies = [ "num-traits", ] @@ -1144,15 +1151,15 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.4" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" [[package]] name = "flate2" -version = "1.1.5" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" dependencies = [ "crc32fast", "miniz_oxide", @@ -1237,9 +1244,9 @@ checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" [[package]] name = "futures" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" dependencies = [ "futures-channel", "futures-core", @@ -1252,9 +1259,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" dependencies = [ "futures-core", "futures-sink", @@ -1262,27 +1269,26 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" [[package]] name = "futures-executor" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" dependencies = [ "futures-core", "futures-task", "futures-util", - "num_cpus", ] [[package]] name = "futures-io" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" [[package]] name = "futures-lite" @@ -1299,9 +1305,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" dependencies = [ "proc-macro2", "quote", @@ -1310,21 +1316,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" [[package]] name = "futures-task" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" [[package]] name = "futures-util" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ "futures-channel", "futures-core", @@ -1334,7 +1340,6 @@ dependencies = [ "futures-task", "memchr", "pin-project-lite", - "pin-utils", "slab", ] @@ -1344,7 +1349,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" dependencies = [ - "rustix 1.1.2", + "rustix 1.1.4", "windows-link", ] @@ -1356,10 +1361,23 @@ checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", "libc", - "r-efi", + "r-efi 5.3.0", "wasip2", ] +[[package]] +name = "getrandom" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", + "wasip2", + "wasip3", +] + [[package]] name = "gif" version = "0.14.1" @@ -1414,7 +1432,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "gpu-alloc-types", ] @@ -1424,7 +1442,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", ] [[package]] @@ -1445,7 +1463,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b89c83349105e3732062a895becfc71a8f921bb71ecbbdd8ff99263e3b53a0ca" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "gpu-descriptor-types", "hashbrown 0.15.5", ] @@ -1456,7 +1474,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", ] [[package]] @@ -1487,7 +1505,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92c020db12c71d8a12a3fe7607873cade3a01a6287e29d540c8723276221b9d8" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "bytemuck", "core_maths", "read-fonts", @@ -1505,9 +1523,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" dependencies = [ "foldhash 0.2.0", ] @@ -1518,6 +1536,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.5.2" @@ -1538,9 +1562,9 @@ checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" [[package]] name = "iana-time-zone" -version = "0.1.64" +version = "0.1.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1573,7 +1597,7 @@ dependencies = [ "iced_widget", "iced_winit", "image", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -1586,7 +1610,7 @@ dependencies = [ "log", "semver", "serde", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", ] @@ -1594,7 +1618,7 @@ dependencies = [ name = "iced_core" version = "0.15.0-dev" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "bytes", "glam", "lilt", @@ -1603,7 +1627,7 @@ dependencies = [ "rustc-hash 2.1.1", "serde", "smol_str", - "thiserror 2.0.17", + "thiserror 2.0.18", "web-time", ] @@ -1644,7 +1668,7 @@ dependencies = [ name = "iced_graphics" version = "0.15.0-dev" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "bytemuck", "cosmic-text", "half", @@ -1656,7 +1680,7 @@ dependencies = [ "lyon_path", "raw-window-handle", "rustc-hash 2.1.1", - "thiserror 2.0.17", + "thiserror 2.0.18", "unicode-segmentation", ] @@ -1676,7 +1700,7 @@ dependencies = [ "iced_tiny_skia", "iced_wgpu", "log", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -1687,7 +1711,7 @@ dependencies = [ "iced_core", "iced_futures", "raw-window-handle", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -1709,7 +1733,7 @@ dependencies = [ name = "iced_wgpu" version = "0.15.0-dev" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "bytemuck", "cryoglyph", "futures", @@ -1720,7 +1744,7 @@ dependencies = [ "log", "lyon", "rustc-hash 2.1.1", - "thiserror 2.0.17", + "thiserror 2.0.18", "wgpu", ] @@ -1733,7 +1757,7 @@ dependencies = [ "num-traits", "ouroboros", "rustc-hash 2.1.1", - "thiserror 2.0.17", + "thiserror 2.0.18", "unicode-segmentation", ] @@ -1746,7 +1770,7 @@ dependencies = [ "log", "mundy", "rustc-hash 2.1.1", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "wasm-bindgen-futures", "web-sys", @@ -1755,10 +1779,16 @@ dependencies = [ ] [[package]] -name = "image" -version = "0.25.9" +name = "id-arena" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6506c6c10786659413faa717ceebcb8f70731c0a60cbae39795fdf114519c1a" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + +[[package]] +name = "image" +version = "0.25.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" dependencies = [ "bytemuck", "byteorder-lite", @@ -1774,8 +1804,8 @@ dependencies = [ "rayon", "rgb", "tiff", - "zune-core 0.5.0", - "zune-jpeg 0.5.6", + "zune-core", + "zune-jpeg", ] [[package]] @@ -1796,12 +1826,14 @@ checksum = "e7c5cedc30da3a610cac6b4ba17597bdf7152cf974e8aab3afb3d54455e371c8" [[package]] name = "indexmap" -version = "2.12.0" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", - "hashbrown 0.16.0", + "hashbrown 0.16.1", + "serde", + "serde_core", ] [[package]] @@ -1826,9 +1858,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] name = "jni" @@ -1858,15 +1890,15 @@ version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" dependencies = [ - "getrandom", + "getrandom 0.3.4", "libc", ] [[package]] name = "js-sys" -version = "0.3.81" +version = "0.3.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305" +checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" dependencies = [ "once_cell", "wasm-bindgen", @@ -1914,6 +1946,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + [[package]] name = "lebe" version = "0.5.3" @@ -1922,15 +1960,15 @@ checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8" [[package]] name = "libc" -version = "0.2.177" +version = "0.2.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" +checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" [[package]] name = "libfuzzer-sys" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5037190e1f70cbeef565bd267599242926f724d3b8a9f510fd7e0b540cfa4404" +checksum = "f12a681b7dd8ce12bff52488013ba614b869148d54dd79836ab85aafdd53f08d" dependencies = [ "arbitrary", "cc", @@ -1948,19 +1986,20 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libredox" -version = "0.1.10" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" +checksum = "1744e39d1d6a9948f4f388969627434e31128196de472883b39f148769bfe30a" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "libc", - "redox_syscall 0.5.18", + "plain", + "redox_syscall 0.7.3", ] [[package]] @@ -1986,9 +2025,9 @@ checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "linux-raw-sys" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "litrs" @@ -2007,9 +2046,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.28" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "loop9" @@ -2022,15 +2061,15 @@ dependencies = [ [[package]] name = "lru" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96051b46fc183dc9cd4a223960ef37b9af631b55191852a8274bfef064cda20f" +checksum = "a1dc47f592c06f33f8e3aea9591776ec7c9f9e4124778ff8a3c3b87159f7e593" [[package]] name = "lyon" -version = "1.0.16" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbcb7d54d54c8937364c9d41902d066656817dce1e03a44e5533afebd1ef4352" +checksum = "bd0578bdecb7d6d88987b8b2b1e3a4e2f81df9d0ece1078623324a567904e7b7" dependencies = [ "lyon_algorithms", "lyon_tessellation", @@ -2038,9 +2077,9 @@ dependencies = [ [[package]] name = "lyon_algorithms" -version = "1.0.16" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c0829e28c4f336396f250d850c3987e16ce6db057ffe047ce0dd54aab6b647" +checksum = "9815fac08e6fd96733a11dce4f9d15a3f338e96a2e2311ee21e1b738efc2bc0f" dependencies = [ "lyon_path", "num-traits", @@ -2048,9 +2087,9 @@ dependencies = [ [[package]] name = "lyon_geom" -version = "1.0.17" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e16770d760c7848b0c1c2d209101e408207a65168109509f8483837a36cf2e7" +checksum = "4336502e29e32af93cf2dad2214ed6003c17ceb5bd499df77b1de663b9042b92" dependencies = [ "arrayvec", "euclid", @@ -2059,9 +2098,9 @@ dependencies = [ [[package]] name = "lyon_path" -version = "1.0.16" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aeca86bcfd632a15984ba029b539ffb811e0a70bf55e814ef8b0f54f506fdeb" +checksum = "5c463f9c428b7fc5ec885dcd39ce4aa61e29111d0e33483f6f98c74e89d8621e" dependencies = [ "lyon_geom", "num-traits", @@ -2069,9 +2108,9 @@ dependencies = [ [[package]] name = "lyon_tessellation" -version = "1.0.16" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3f586142e1280335b1bc89539f7c97dd80f08fc43e9ab1b74ef0a42b04aa353" +checksum = "05a35a7dd71b845ff317ce1834c4185506b79790294bde397df8d5c23031e357" dependencies = [ "float_next_after", "lyon_path", @@ -2117,15 +2156,15 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.6" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "memmap2" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744133e4a0e0a658e1374cf3bf8e415c4052a15a111acd372764c55b4177d490" +checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3" dependencies = [ "libc", ] @@ -2145,7 +2184,7 @@ version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00c15a6f673ff72ddcc22394663290f870fb224c1bfce55734a75c414150e605" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block", "core-graphics-types 0.2.0", "foreign-types", @@ -2166,9 +2205,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" dependencies = [ "libc", "wasi", @@ -2177,9 +2216,9 @@ dependencies = [ [[package]] name = "moxcms" -version = "0.7.10" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80986bbbcf925ebd3be54c26613d861255284584501595cf418320c078945608" +checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b" dependencies = [ "num-traits", "pxfm", @@ -2199,7 +2238,7 @@ dependencies = [ "futures-lite", "jni", "ndk-context", - "objc2 0.6.3", + "objc2 0.6.4", "objc2-app-kit 0.3.2", "objc2-foundation 0.3.2", "pin-project-lite", @@ -2224,12 +2263,12 @@ checksum = "066cf25f0e8b11ee0df221219010f213ad429855f57c494f995590c861a9a7d8" dependencies = [ "arrayvec", "bit-set", - "bitflags 2.10.0", + "bitflags 2.11.0", "cfg-if", "cfg_aliases", "codespan-reporting", "half", - "hashbrown 0.16.0", + "hashbrown 0.16.1", "hexf-parse", "indexmap", "libm", @@ -2238,7 +2277,7 @@ dependencies = [ "once_cell", "rustc-hash 1.1.0", "spirv", - "thiserror 2.0.17", + "thiserror 2.0.18", "unicode-ident", ] @@ -2248,7 +2287,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "jni-sys", "log", "ndk-sys", @@ -2278,15 +2317,18 @@ version = "0.1.0" dependencies = [ "bitfield", "bytes", + "console_error_panic_hook", + "console_log", "cpal", "iced", - "iced_core", + "log", "rfd", "ringbuf", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tracing", "tracing-subscriber", + "web-sys", ] [[package]] @@ -2295,19 +2337,6 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" -[[package]] -name = "nix" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" -dependencies = [ - "bitflags 2.10.0", - "cfg-if", - "cfg_aliases", - "libc", - "memoffset", -] - [[package]] name = "nom" version = "8.0.0" @@ -2383,21 +2412,11 @@ dependencies = [ "libm", ] -[[package]] -name = "num_cpus" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "num_enum" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" dependencies = [ "num_enum_derive", "rustversion", @@ -2405,9 +2424,9 @@ dependencies = [ [[package]] name = "num_enum_derive" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2442,9 +2461,9 @@ dependencies = [ [[package]] name = "objc2" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" +checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f" dependencies = [ "objc2-encode", ] @@ -2455,7 +2474,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.5.1", "libc", "objc2 0.5.2", @@ -2471,10 +2490,10 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.6.2", "libc", - "objc2 0.6.3", + "objc2 0.6.4", "objc2-cloud-kit 0.3.2", "objc2-core-data 0.3.2", "objc2-core-foundation", @@ -2492,9 +2511,9 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6948501a91121d6399b79abaa33a8aa4ea7857fe019f341b8c23ad6e81b79b08" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "libc", - "objc2 0.6.3", + "objc2 0.6.4", "objc2-core-audio", "objc2-core-audio-types", "objc2-core-foundation", @@ -2507,7 +2526,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13a380031deed8e99db00065c45937da434ca987c034e13b87e4441f9e4090be" dependencies = [ - "objc2 0.6.3", + "objc2 0.6.4", "objc2-foundation 0.3.2", ] @@ -2517,7 +2536,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.5.1", "objc2 0.5.2", "objc2-core-location", @@ -2530,8 +2549,8 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c" dependencies = [ - "bitflags 2.10.0", - "objc2 0.6.3", + "bitflags 2.11.0", + "objc2 0.6.4", "objc2-foundation 0.3.2", ] @@ -2553,7 +2572,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1eebcea8b0dbff5f7c8504f3107c68fc061a3eb44932051c8cf8a68d969c3b2" dependencies = [ "dispatch2", - "objc2 0.6.3", + "objc2 0.6.4", "objc2-core-audio-types", "objc2-core-foundation", "objc2-foundation 0.3.2", @@ -2565,8 +2584,8 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a89f2ec274a0cf4a32642b2991e8b351a404d290da87bb6a9a9d8632490bd1c" dependencies = [ - "bitflags 2.10.0", - "objc2 0.6.3", + "bitflags 2.11.0", + "objc2 0.6.4", ] [[package]] @@ -2575,7 +2594,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -2587,8 +2606,8 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa" dependencies = [ - "bitflags 2.10.0", - "objc2 0.6.3", + "bitflags 2.11.0", + "objc2 0.6.4", "objc2-foundation 0.3.2", ] @@ -2598,11 +2617,11 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.6.2", "dispatch2", "libc", - "objc2 0.6.3", + "objc2 0.6.4", ] [[package]] @@ -2611,9 +2630,9 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "dispatch2", - "objc2 0.6.3", + "objc2 0.6.4", "objc2-core-foundation", "objc2-io-surface", ] @@ -2636,7 +2655,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006" dependencies = [ - "objc2 0.6.3", + "objc2 0.6.4", "objc2-foundation 0.3.2", ] @@ -2658,8 +2677,8 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" dependencies = [ - "bitflags 2.10.0", - "objc2 0.6.3", + "bitflags 2.11.0", + "objc2 0.6.4", "objc2-core-foundation", "objc2-core-graphics", ] @@ -2670,8 +2689,8 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d425caf1df73233f29fd8a5c3e5edbc30d2d4307870f802d18f00d83dc5141a6" dependencies = [ - "bitflags 2.10.0", - "objc2 0.6.3", + "bitflags 2.11.0", + "objc2 0.6.4", "objc2-core-foundation", "objc2-core-graphics", "objc2-io-surface", @@ -2689,7 +2708,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.5.1", "dispatch", "libc", @@ -2702,10 +2721,10 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.6.2", "libc", - "objc2 0.6.3", + "objc2 0.6.4", "objc2-core-foundation", ] @@ -2715,8 +2734,8 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" dependencies = [ - "bitflags 2.10.0", - "objc2 0.6.3", + "bitflags 2.11.0", + "objc2 0.6.4", "objc2-core-foundation", ] @@ -2738,7 +2757,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -2750,7 +2769,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -2763,8 +2782,9 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" dependencies = [ - "bitflags 2.10.0", - "objc2 0.6.3", + "bitflags 2.11.0", + "objc2 0.6.4", + "objc2-core-foundation", "objc2-foundation 0.3.2", ] @@ -2784,7 +2804,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.5.1", "objc2 0.5.2", "objc2-cloud-kit 0.2.2", @@ -2816,7 +2836,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.5.1", "objc2 0.5.2", "objc2-core-location", @@ -2825,16 +2845,17 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.3" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] name = "orbclient" -version = "0.3.49" +version = "0.3.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "247ad146e19b9437f8604c21f8652423595cf710ad108af40e77d3ae6e96b827" +checksum = "59aed3b33578edcfa1bc96a321d590d31832b6ad55a26f0313362ce687e9abd6" dependencies = [ + "libc", "libredox", ] @@ -2874,7 +2895,7 @@ version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c7028bdd3d43083f6d8d4d5187680d0d3560d54df4cc9d752005268b41e64d0" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "proc-macro2-diagnostics", "quote", @@ -2939,18 +2960,18 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pin-project" -version = "1.1.10" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +checksum = "f1749c7ed4bcaf4c3d0a3efc28538844fb29bcdd7d2b67b2be7e20ba861ff517" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.10" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" dependencies = [ "proc-macro2", "quote", @@ -2959,9 +2980,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "pin-utils" @@ -2971,9 +2992,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" +checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1" dependencies = [ "atomic-waker", "fastrand", @@ -2987,12 +3008,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] -name = "png" -version = "0.18.0" +name = "plain" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97baced388464909d42d89643fe4361939af9b7ce7a31ee32a168f832a70f2a0" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "crc32fast", "fdeflate", "flate2", @@ -3009,7 +3036,7 @@ dependencies = [ "concurrent-queue", "hermit-abi", "pin-project-lite", - "rustix 1.1.2", + "rustix 1.1.4", "windows-sys 0.61.2", ] @@ -3021,15 +3048,15 @@ checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" [[package]] name = "portable-atomic" -version = "1.11.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" [[package]] name = "portable-atomic-util" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +checksum = "091397be61a01d4be58e7841595bd4bfedb15f1cd54977d79b8271e94ed799a3" dependencies = [ "portable-atomic", ] @@ -3050,19 +3077,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" [[package]] -name = "proc-macro-crate" -version = "3.4.0" +name = "prettyplease" +version = "0.2.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ "toml_edit", ] [[package]] name = "proc-macro2" -version = "1.0.103" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] @@ -3101,12 +3138,9 @@ dependencies = [ [[package]] name = "pxfm" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7186d3822593aa4393561d186d1393b3923e9d6163d3fbfd6e825e3e6cf3e6a8" -dependencies = [ - "num-traits", -] +checksum = "b5a041e753da8b807c9255f28de81879c78c876392ff2469cde94799b2896b9d" [[package]] name = "qoi" @@ -3125,18 +3159,18 @@ checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] name = "quick-xml" -version = "0.37.5" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb" +checksum = "958f21e8e7ceb5a1aa7fa87fab28e7c75976e0bfe7e23ff069e0a260f894067d" dependencies = [ "memchr", ] [[package]] name = "quote" -version = "1.0.41" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] @@ -3147,6 +3181,12 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + [[package]] name = "rand" version = "0.9.2" @@ -3169,24 +3209,24 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ - "getrandom", + "getrandom 0.3.4", ] [[package]] name = "range-alloc" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d6831663a5098ea164f89cff59c6284e95f4e3c76ce9848d4529f5ccca9bde" +checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08" [[package]] name = "rangemap" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7e49bb0bf967717f7bd674458b3d6b0c5f48ec7e3038166026a69fc22223" +checksum = "973443cf09a9c8656b574a866ab68dfa19f0867d0340648c7d2f6a71b8a8ea68" [[package]] name = "rav1e" @@ -3218,16 +3258,16 @@ dependencies = [ "rand", "rand_chacha", "simd_helpers", - "thiserror 2.0.17", + "thiserror 2.0.18", "v_frame", "wasm-bindgen", ] [[package]] name = "ravif" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef69c1990ceef18a116855938e74793a5f7496ee907562bd0857b6ac734ab285" +checksum = "e52310197d971b0f5be7fe6b57530dcd27beb35c1b013f29d66c1ad73fbbcc45" dependencies = [ "avif-serialize", "imgref", @@ -3290,14 +3330,23 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", +] + +[[package]] +name = "redox_syscall" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce70a74e890531977d37e532c34d45e9055d2409ed08ddba14529471ed0be16" +dependencies = [ + "bitflags 2.11.0", ] [[package]] name = "regex-automata" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", @@ -3306,9 +3355,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "renderdoc-sys" @@ -3327,7 +3376,7 @@ dependencies = [ "js-sys", "libc", "log", - "objc2 0.6.3", + "objc2 0.6.4", "objc2-app-kit 0.3.2", "objc2-core-foundation", "objc2-foundation 0.3.2", @@ -3345,9 +3394,9 @@ dependencies = [ [[package]] name = "rgb" -version = "0.8.52" +version = "0.8.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c6a884d2998352bb4daf0183589aec883f16a6da1f4dde84d8e2e9a5409a1ce" +checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4" [[package]] name = "ringbuf" @@ -3384,7 +3433,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "errno", "libc", "linux-raw-sys 0.4.15", @@ -3393,14 +3442,14 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.2" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "errno", "libc", - "linux-raw-sys 0.11.0", + "linux-raw-sys 0.12.1", "windows-sys 0.61.2", ] @@ -3410,12 +3459,6 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - [[package]] name = "same-file" version = "1.0.6" @@ -3452,9 +3495,9 @@ dependencies = [ [[package]] name = "self_cell" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16c2f82143577edb4921b71ede051dac62ca3c16084e918bf7b40c96ae10eb33" +checksum = "b12e76d157a900eb52e81bc6e9f3069344290341720e9178cde2407113ac8d89" [[package]] name = "semver" @@ -3498,15 +3541,15 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.145" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ "itoa", "memchr", - "ryu", "serde", "serde_core", + "zmij", ] [[package]] @@ -3537,18 +3580,19 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.6" +version = "1.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ + "errno", "libc", ] [[package]] name = "simd-adler32" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" +checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" [[package]] name = "simd_helpers" @@ -3571,15 +3615,15 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "slotmap" -version = "1.0.7" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" +checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038" dependencies = [ "version_check", ] @@ -3596,7 +3640,7 @@ version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "calloop 0.13.0", "calloop-wayland-source 0.3.0", "cursor-icon", @@ -3621,15 +3665,15 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0512da38f5e2b31201a93524adb8d3136276fa4fe4aafab4e1f727a82b534cc0" dependencies = [ - "bitflags 2.10.0", - "calloop 0.14.3", + "bitflags 2.11.0", + "calloop 0.14.4", "calloop-wayland-source 0.4.1", "cursor-icon", "libc", "log", "memmap2", - "rustix 1.1.2", - "thiserror 2.0.17", + "rustix 1.1.4", + "thiserror 2.0.18", "wayland-backend", "wayland-client", "wayland-csd-frame", @@ -3664,42 +3708,42 @@ dependencies = [ [[package]] name = "socket2" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] name = "softbuffer" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18051cdd562e792cad055119e0cdb2cfc137e44e3987532e0f9659a77931bb08" +checksum = "aac18da81ebbf05109ab275b157c22a653bb3c12cf884450179942f81bcbf6c3" dependencies = [ "as-raw-xcb-connection", "bytemuck", - "cfg_aliases", - "core-graphics 0.24.0", "fastrand", - "foreign-types", "js-sys", - "log", "memmap2", - "objc2 0.5.2", - "objc2-foundation 0.2.2", - "objc2-quartz-core 0.2.2", + "ndk", + "objc2 0.6.4", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", + "objc2-quartz-core 0.3.2", "raw-window-handle", "redox_syscall 0.5.18", - "rustix 0.38.44", + "rustix 1.1.4", "tiny-xlib", + "tracing", "wasm-bindgen", "wayland-backend", "wayland-client", "wayland-sys", "web-sys", - "windows-sys 0.59.0", + "windows-sys 0.61.2", "x11rb", ] @@ -3709,7 +3753,7 @@ version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", ] [[package]] @@ -3749,9 +3793,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.108" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -3769,14 +3813,14 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.23.0" +version = "3.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom", + "getrandom 0.4.2", "once_cell", - "rustix 1.1.2", + "rustix 1.1.4", "windows-sys 0.61.2", ] @@ -3800,11 +3844,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl 2.0.17", + "thiserror-impl 2.0.18", ] [[package]] @@ -3820,9 +3864,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", @@ -3840,16 +3884,16 @@ dependencies = [ [[package]] name = "tiff" -version = "0.10.3" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af9605de7fee8d9551863fd692cce7637f548dbd9db9180fcc07ccc6d26c336f" +checksum = "b63feaf3343d35b6ca4d50483f94843803b0f51634937cc2ec519fc32232bc52" dependencies = [ "fax", "flate2", "half", "quick-error", "weezl", - "zune-jpeg 0.4.21", + "zune-jpeg", ] [[package]] @@ -3892,9 +3936,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" +checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" dependencies = [ "tinyvec_macros", ] @@ -3907,16 +3951,14 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.48.0" +version = "1.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" +checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" dependencies = [ "bytes", "libc", "mio", - "parking_lot", "pin-project-lite", - "signal-hook-registry", "socket2", "tokio-macros", "windows-sys 0.61.2", @@ -3924,9 +3966,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c" dependencies = [ "proc-macro2", "quote", @@ -3935,39 +3977,39 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.7.3" +version = "1.0.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" +checksum = "9b320e741db58cac564e26c607d3cc1fdc4a88fd36c879568c07856ed83ff3e9" dependencies = [ "serde_core", ] [[package]] name = "toml_edit" -version = "0.23.7" +version = "0.25.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6485ef6d0d9b5d0ec17244ff7eb05310113c3f316f2d14200d4de56b3cb98f8d" +checksum = "8ca1a40644a28bce036923f6a431df0b34236949d111cc07cb6dca830c9ef2e1" dependencies = [ "indexmap", "toml_datetime", "toml_parser", - "winnow", + "winnow 1.0.0", ] [[package]] name = "toml_parser" -version = "1.0.4" +version = "1.0.10+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" +checksum = "7df25b4befd31c4816df190124375d5a20c6b6921e2cad937316de3fccd63420" dependencies = [ - "winnow", + "winnow 1.0.0", ] [[package]] name = "tracing" -version = "0.1.41" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "log", "pin-project-lite", @@ -3977,9 +4019,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", @@ -3988,9 +4030,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.34" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", "valuable", @@ -4019,9 +4061,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.20" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" dependencies = [ "chrono", "matchers", @@ -4050,13 +4092,13 @@ dependencies = [ [[package]] name = "uds_windows" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" +checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" dependencies = [ "memoffset", "tempfile", - "winapi", + "windows-sys 0.61.2", ] [[package]] @@ -4067,9 +4109,9 @@ checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" -version = "1.0.20" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "unicode-linebreak" @@ -4079,9 +4121,9 @@ checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" [[package]] name = "unicode-script" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb421b350c9aff471779e262955939f565ec18b86c15364e6bdf0d662ca7c1f" +checksum = "383ad40bb927465ec0ce7720e033cb4ca06912855fc35db31b5755d0de75b1ee" [[package]] name = "unicode-segmentation" @@ -4091,15 +4133,21 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.14" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "uuid" -version = "1.19.0" +version = "1.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e054861b4bd027cd373e18e8d8d8e6548085000e41290d95ce0c373a654b4a" +checksum = "a68d3c8f01c0cfa54a75291d83601161799e4a89a39e0929f4b0354d88757a37" dependencies = [ "js-sys", "serde_core", @@ -4147,18 +4195,27 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.1+wasi-0.2.4" +version = "1.0.2+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" dependencies = [ "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.104" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d" +checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" dependencies = [ "cfg-if", "once_cell", @@ -4167,25 +4224,11 @@ dependencies = [ "wasm-bindgen-shared", ] -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - [[package]] name = "wasm-bindgen-futures" -version = "0.4.54" +version = "0.4.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e038d41e478cc73bae0ff9b36c60cff1c98b8f38f8d7e8061e79ee63608ac5c" +checksum = "836d9622d604feee9e5de25ac10e3ea5f2d65b41eac0d9ce72eb5deae707ce7c" dependencies = [ "cfg-if", "js-sys", @@ -4196,9 +4239,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.104" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119" +checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4206,26 +4249,60 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.104" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7" +checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" dependencies = [ + "bumpalo", "proc-macro2", "quote", "syn", - "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.104" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1" +checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags 2.11.0", + "hashbrown 0.15.5", + "indexmap", + "semver", +] + [[package]] name = "wasmtimer" version = "0.4.3" @@ -4242,13 +4319,13 @@ dependencies = [ [[package]] name = "wayland-backend" -version = "0.3.11" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673a33c33048a5ade91a6b139580fa174e19fb0d23f396dca9fa15f2e1e49b35" +checksum = "aa75f400b7f719bcd68b3f47cd939ba654cedeef690f486db71331eec4c6a406" dependencies = [ "cc", "downcast-rs", - "rustix 1.1.2", + "rustix 1.1.4", "scoped-tls", "smallvec", "wayland-sys", @@ -4256,12 +4333,12 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.11" +version = "0.31.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66a47e840dc20793f2264eb4b3e4ecb4b75d91c0dd4af04b456128e0bdd449d" +checksum = "ab51d9f7c071abeee76007e2b742499e535148035bb835f97aaed1338cf516c3" dependencies = [ - "bitflags 2.10.0", - "rustix 1.1.2", + "bitflags 2.11.0", + "rustix 1.1.4", "wayland-backend", "wayland-scanner", ] @@ -4272,29 +4349,29 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "cursor-icon", "wayland-backend", ] [[package]] name = "wayland-cursor" -version = "0.31.11" +version = "0.31.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447ccc440a881271b19e9989f75726d60faa09b95b0200a9b7eb5cc47c3eeb29" +checksum = "4b3298683470fbdc6ca40151dfc48c8f2fd4c41a26e13042f801f85002384091" dependencies = [ - "rustix 1.1.2", + "rustix 1.1.4", "wayland-client", "xcursor", ] [[package]] name = "wayland-protocols" -version = "0.32.9" +version = "0.32.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa790ed75fbfd71283bd2521a1cfdc022aabcc28bdcff00851f9e4ae88d9901" +checksum = "b23b5df31ceff1328f06ac607591d5ba360cf58f90c8fad4ac8d3a55a3c4aec7" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "wayland-backend", "wayland-client", "wayland-scanner", @@ -4306,7 +4383,7 @@ version = "20250721.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40a1f863128dcaaec790d7b4b396cc9b9a7a079e878e18c47e6c2d2c5a8dcbb1" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -4315,11 +4392,11 @@ dependencies = [ [[package]] name = "wayland-protocols-misc" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfe33d551eb8bffd03ff067a8b44bb963919157841a99957151299a6307d19c" +checksum = "429b99200febaf95d4f4e46deff6fe4382bcff3280ee16a41cf887b3c3364984" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -4328,11 +4405,11 @@ dependencies = [ [[package]] name = "wayland-protocols-plasma" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a07a14257c077ab3279987c4f8bb987851bf57081b93710381daea94f2c2c032" +checksum = "d392fc283a87774afc9beefcd6f931582bb97fe0e6ced0b306a62cb1d026527c" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -4341,11 +4418,11 @@ dependencies = [ [[package]] name = "wayland-protocols-wlr" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd94963ed43cf9938a090ca4f7da58eb55325ec8200c3848963e98dc25b78ec" +checksum = "78248e4cc0eff8163370ba5c158630dcae1f3497a586b826eca2ef5f348d6235" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -4354,9 +4431,9 @@ dependencies = [ [[package]] name = "wayland-scanner" -version = "0.31.7" +version = "0.31.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54cb1e9dc49da91950bdfd8b848c49330536d9d1fb03d4bfec8cae50caa50ae3" +checksum = "c86287151a309799b821ca709b7345a048a2956af05957c89cb824ab919fa4e3" dependencies = [ "proc-macro2", "quick-xml", @@ -4365,9 +4442,9 @@ dependencies = [ [[package]] name = "wayland-sys" -version = "0.31.7" +version = "0.31.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34949b42822155826b41db8e5d0c1be3a2bd296c747577a43a3e6daefc296142" +checksum = "374f6b70e8e0d6bf9461a32988fd553b59ff630964924dad6e4a4eb6bd538d17" dependencies = [ "dlib", "log", @@ -4377,9 +4454,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.81" +version = "0.3.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9367c417a924a74cae129e6a2ae3b47fabb1f8995595ab474029da749a8be120" +checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" dependencies = [ "js-sys", "wasm-bindgen", @@ -4408,11 +4485,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfe68bac7cde125de7a731c3400723cadaaf1703795ad3f4805f187459cd7a77" dependencies = [ "arrayvec", - "bitflags 2.10.0", + "bitflags 2.11.0", "cfg-if", "cfg_aliases", "document-features", - "hashbrown 0.16.0", + "hashbrown 0.16.1", "js-sys", "log", "naga", @@ -4439,11 +4516,11 @@ dependencies = [ "arrayvec", "bit-set", "bit-vec", - "bitflags 2.10.0", + "bitflags 2.11.0", "bytemuck", "cfg_aliases", "document-features", - "hashbrown 0.16.0", + "hashbrown 0.16.1", "indexmap", "log", "naga", @@ -4454,7 +4531,7 @@ dependencies = [ "raw-window-handle", "rustc-hash 1.1.0", "smallvec", - "thiserror 2.0.17", + "thiserror 2.0.18", "wgpu-core-deps-apple", "wgpu-core-deps-emscripten", "wgpu-core-deps-windows-linux-android", @@ -4499,7 +4576,7 @@ dependencies = [ "arrayvec", "ash", "bit-set", - "bitflags 2.10.0", + "bitflags 2.11.0", "block", "bytemuck", "cfg-if", @@ -4510,7 +4587,7 @@ dependencies = [ "gpu-alloc", "gpu-allocator", "gpu-descriptor", - "hashbrown 0.16.0", + "hashbrown 0.16.1", "js-sys", "khronos-egl", "libc", @@ -4530,7 +4607,7 @@ dependencies = [ "raw-window-handle", "renderdoc-sys", "smallvec", - "thiserror 2.0.17", + "thiserror 2.0.18", "wasm-bindgen", "web-sys", "wgpu-types", @@ -4544,30 +4621,14 @@ version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afdcf84c395990db737f2dd91628706cb31e86d72e53482320d368e52b5da5eb" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "bytemuck", "js-sys", "log", - "thiserror 2.0.17", + "thiserror 2.0.18", "web-sys", ] -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - [[package]] name = "winapi-util" version = "0.1.11" @@ -4577,12 +4638,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "window_clipboard" version = "0.5.1" @@ -4594,7 +4649,7 @@ dependencies = [ "clipboard_wayland", "clipboard_x11", "raw-window-handle", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -4789,15 +4844,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets 0.53.5", -] - [[package]] name = "windows-sys" version = "0.61.2" @@ -4831,30 +4877,13 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", + "windows_i686_gnullvm", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] -[[package]] -name = "windows-targets" -version = "0.53.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" -dependencies = [ - "windows-link", - "windows_aarch64_gnullvm 0.53.1", - "windows_aarch64_msvc 0.53.1", - "windows_i686_gnu 0.53.1", - "windows_i686_gnullvm 0.53.1", - "windows_i686_msvc 0.53.1", - "windows_x86_64_gnu 0.53.1", - "windows_x86_64_gnullvm 0.53.1", - "windows_x86_64_msvc 0.53.1", -] - [[package]] name = "windows-threading" version = "0.2.1" @@ -4876,12 +4905,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" - [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -4894,12 +4917,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" - [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -4912,24 +4929,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -[[package]] -name = "windows_i686_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" - [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" - [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -4942,12 +4947,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_i686_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" - [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -4960,12 +4959,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" - [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -4978,12 +4971,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" - [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -4996,12 +4983,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" - [[package]] name = "winit" version = "0.30.8" @@ -5010,14 +4991,14 @@ dependencies = [ "ahash", "android-activity", "atomic-waker", - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.5.1", "bytemuck", "calloop 0.13.0", "cfg_aliases", "concurrent-queue", "core-foundation 0.9.4", - "core-graphics 0.23.2", + "core-graphics", "cursor-icon", "dpi", "js-sys", @@ -5055,18 +5036,109 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.13" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a90e88e4667264a994d34e6d1ab2d26d398dcdca8b7f52bec8668957517fc7d8" dependencies = [ "memchr", ] [[package]] name = "wit-bindgen" -version = "0.46.0" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck 0.5.0", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap", + "prettyplease", + "syn", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags 2.11.0", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] [[package]] name = "x11-dl" @@ -5090,7 +5162,7 @@ dependencies = [ "libc", "libloading", "once_cell", - "rustix 1.1.2", + "rustix 1.1.4", "x11rb-protocol", ] @@ -5112,7 +5184,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "dlib", "log", "once_cell", @@ -5151,9 +5223,9 @@ checksum = "e01738255b5a16e78bbb83e7fbba0a1e7dd506905cfc53f4622d89015a03fbb5" [[package]] name = "zbus" -version = "5.12.0" +version = "5.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b622b18155f7a93d1cd2dc8c01d2d6a44e08fb9ebb7b3f9e6ed101488bad6c91" +checksum = "ca82f95dbd3943a40a53cfded6c2d0a2ca26192011846a1810c4256ef92c60bc" dependencies = [ "async-broadcast", "async-executor", @@ -5169,15 +5241,16 @@ dependencies = [ "futures-core", "futures-lite", "hex", - "nix", + "libc", "ordered-stream", + "rustix 1.1.4", "serde", "serde_repr", "tracing", "uds_windows", "uuid", "windows-sys 0.61.2", - "winnow", + "winnow 0.7.15", "zbus_macros", "zbus_names", "zvariant", @@ -5185,9 +5258,9 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "5.12.0" +version = "5.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cdb94821ca8a87ca9c298b5d1cbd80e2a8b67115d99f6e4551ac49e42b6a314" +checksum = "897e79616e84aac4b2c46e9132a4f63b93105d54fe8c0e8f6bffc21fa8d49222" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5200,13 +5273,12 @@ dependencies = [ [[package]] name = "zbus_names" -version = "4.2.0" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be68e64bf6ce8db94f63e72f0c7eb9a60d733f7e0499e628dfab0f84d6bcb97" +checksum = "ffd8af6d5b78619bab301ff3c560a5bd22426150253db278f164d6cf3b72c50f" dependencies = [ "serde", - "static_assertions", - "winnow", + "winnow 0.7.15", "zvariant", ] @@ -5218,18 +5290,18 @@ checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524" [[package]] name = "zerocopy" -version = "0.8.27" +version = "0.8.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" +checksum = "f2578b716f8a7a858b7f02d5bd870c14bf4ddbbcf3a4c05414ba6503640505e3" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.27" +version = "0.8.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" +checksum = "7e6cc098ea4d3bd6246687de65af3f920c430e236bee1e3bf2e441463f08a02f" dependencies = [ "proc-macro2", "quote", @@ -5237,16 +5309,16 @@ dependencies = [ ] [[package]] -name = "zune-core" -version = "0.4.12" +name = "zmij" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" [[package]] name = "zune-core" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "111f7d9820f05fd715df3144e254d6fc02ee4088b0644c0ffd0efc9e6d9d2773" +checksum = "cb8a0807f7c01457d0379ba880ba6322660448ddebc890ce29bb64da71fb40f9" [[package]] name = "zune-inflate" @@ -5259,41 +5331,32 @@ dependencies = [ [[package]] name = "zune-jpeg" -version = "0.4.21" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ce2c8a9384ad323cf564b67da86e21d3cfdff87908bc1223ed5c99bc792713" +checksum = "ec5f41c76397b7da451efd19915684f727d7e1d516384ca6bd0ec43ec94de23c" dependencies = [ - "zune-core 0.4.12", -] - -[[package]] -name = "zune-jpeg" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f520eebad972262a1dde0ec455bce4f8b298b1e5154513de58c114c4c54303e8" -dependencies = [ - "zune-core 0.5.0", + "zune-core", ] [[package]] name = "zvariant" -version = "5.8.0" +version = "5.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2be61892e4f2b1772727be11630a62664a1826b62efa43a6fe7449521cb8744c" +checksum = "5708299b21903bbe348e94729f22c49c55d04720a004aa350f1f9c122fd2540b" dependencies = [ "endi", "enumflags2", "serde", - "winnow", + "winnow 0.7.15", "zvariant_derive", "zvariant_utils", ] [[package]] name = "zvariant_derive" -version = "5.8.0" +version = "5.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da58575a1b2b20766513b1ec59d8e2e68db2745379f961f86650655e862d2006" +checksum = "5b59b012ebe9c46656f9cc08d8da8b4c726510aef12559da3e5f1bf72780752c" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5304,13 +5367,13 @@ dependencies = [ [[package]] name = "zvariant_utils" -version = "3.2.1" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6949d142f89f6916deca2232cf26a8afacf2b9fdc35ce766105e104478be599" +checksum = "f75c23a64ef8f40f13a6989991e643554d9bef1d682a281160cf0c1bc389c5e9" dependencies = [ "proc-macro2", "quote", "serde", "syn", - "winnow", + "winnow 0.7.15", ] diff --git a/Cargo.toml b/Cargo.toml index 5dbfc4e..123da16 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,18 +3,52 @@ name = "nes-emu" version = "0.1.0" edition = "2024" +[features] +default = [] +iced = [ + "dep:iced", "iced/debug", "iced/canvas", "iced/lazy", "iced/image", "iced/advanced", "tokio", "fs" +] +fs = [] +tokio = ["iced/tokio", "dep:tokio", "tokio/time", "tokio/fs"] +iced_wasm = ["dep:iced"] +audio = ["dep:cpal", "dep:ringbuf"] +web = ["dep:web-sys", "dep:web-sys"] + [dependencies] bitfield = "0.19.3" -# iced = { version = "0.14.0", features = ["debug", "canvas", "tokio", "lazy", "image", "advanced"] } -iced = { path = "../iced", features = ["debug", "canvas", "tokio", "lazy", "image", "advanced"] } -iced_core = { path = "../iced/core", features = ["advanced"] } -rfd = "0.17.2" -# iced_graphics = { version = "0.14.0", features = ["geometry", "image"] } -# iced_widget = { version = "0.13.4", features = ["canvas", "image"] } -thiserror = "2.0.17" -tokio = { version = "1.48.0", features = ["full"] } +thiserror = "2.0.18" tracing = "0.1.41" tracing-subscriber = { version = "0.3.20", features = ["ansi", "chrono", "env-filter", "json", "serde"] } bytes = "*" -cpal = "0.17.1" -ringbuf = "0.4.8" + +# yew = { version = "0.23", features = ["csr"], optional = true } +web-sys = { version = "*", features = [ + "HtmlCanvasElement", "CanvasRenderingContext2d", + "Window", "Document", "KeyboardEvent", + "DocumentTimeline", "AudioContextState", + "HtmlButtonElement", + "HtmlInputElement", "FileList", "File", "Blob", + "ImageBitmap", "ImageData", + "AudioContext", "AudioContextOptions", + "AudioBuffer", "AudioBufferOptions", "AudioDestinationNode", "AudioBufferSourceNode", + "GainNode", "AudioParam", "DelayNode" +], optional = true } +cpal = { version = "0.17.1", optional = true} +ringbuf = { version = "0.4.8", optional = true} +iced = { path = "../iced", features = [], optional = true } +# iced_core = { path = "../iced/core", features = ["advanced"], optional = true } +rfd = { version = "0.17.2", optional = true } +tokio = { version = "1.48.0", features = [], optional = true } +log = "*" + +[target.'cfg(target_arch = "wasm32")'.dependencies] +console_error_panic_hook = "0.1" +console_log = "1.0" + +[[bin]] +name = "native" +required-features = ["iced", "rfd", "audio"] + +[[bin]] +name = "wasm" +required-features = ["web"] diff --git a/index.html b/index.html new file mode 100644 index 0000000..c54a31c --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + + + + Yew App + + + + diff --git a/src/apu.rs b/src/apu.rs index c474050..f96ba61 100644 --- a/src/apu.rs +++ b/src/apu.rs @@ -1,9 +1,5 @@ use std::iter::repeat_n; -use iced::{ - Element, Font, - widget::{column, text}, -}; use tracing::debug; macro_rules! lut { @@ -89,8 +85,10 @@ bitfield::bitfield! { struct PulseChannel { enabled: bool, duty_vol: DutyVol, + sweep: Sweep, sweep_reload: bool, + sweep_counter: u8, counter: LengthCounter, @@ -102,15 +100,17 @@ struct PulseChannel { envelope_start: bool, envelope_counter: u8, envelope_divider: u8, + extra: u16, } impl PulseChannel { - pub fn new() -> Self { + pub fn new(extra: u16) -> Self { Self { enabled: false, duty_vol: DutyVol(0), sweep: Sweep(0), sweep_reload: false, + sweep_counter: 0, counter: LengthCounter::new(), period: 0, period_timer: 0, @@ -119,6 +119,7 @@ impl PulseChannel { envelope_start: false, envelope_counter: 0, envelope_divider: 0, + extra, } } @@ -131,7 +132,7 @@ impl PulseChannel { 0x01 => { self.sweep.0 = val; self.sweep_reload = true; - }, + } 0x02 => self.period = self.period & 0x700 | (val as u16), 0x03 => { let reg = LengthTimerHigh(val); @@ -143,7 +144,7 @@ impl PulseChannel { _ => unreachable!(), } } - + fn volume(&self) -> u8 { if self.duty_vol.const_vol() { self.duty_vol.volume() @@ -151,7 +152,7 @@ impl PulseChannel { self.envelope_counter } } - + pub fn clock(&mut self) { if !self.enabled { self.sample = 0; @@ -177,7 +178,7 @@ impl PulseChannel { // TODO } pub fn cur_sample(&self) -> u8 { - if self.enabled && !self.counter.silenced() { + if self.enabled && !self.counter.silenced() && !self.sweep_silenced() { self.sample } else { 0 @@ -205,30 +206,54 @@ impl PulseChannel { } } } + fn target_period(&self) -> u16 { + let amt = self.period >> self.sweep.shift(); + if self.sweep.negate() { + self.period.saturating_sub(amt + self.extra) + } else { + self.period + amt + } + } + fn sweep_silenced(&self) -> bool { + self.period < 8 || self.target_period() > 0x7FF + } pub fn h_frame_clock(&mut self) { self.q_frame_clock(); + if self.sweep.enable() { + if self.sweep_reload { + self.sweep_counter = self.sweep.period(); + self.sweep_reload = false; + } else if self.sweep_counter == 0 { + self.sweep_counter = self.sweep.period(); + if self.period < 8 || self.target_period() < 0x7FF { + self.period = self.target_period(); + } + } else { + self.sweep_counter -= 1; + } + } } - pub fn view(&self) -> Element<'_, T> { - text!( + pub fn view(&self) -> String { + format!( "Square Channel -Evelope Volume: {0:>3} ${0:02X} +Evelope Volume: {0:>4} ${0:02X} Constant Volume: {1} Length Counter - Halted: {2} -Duty: {3:>3} ${3:02X} -Sweep - Shift: {4:>3} ${4:02X} +Duty: {3:>4} ${3:02X} +Sweep - Shift: {4:>4} ${4:02X} Sweep - Negate: {5} -Sweep - Period: {6:>3} ${6:02X} +Sweep - Period: {6:>4} ${6:02X} Sweep - Enabled: {7} -Period: {8:>3} ${8:04X} -Length Counter - Reload Value: {9:>3} ${9:04X} +Period: {8:>4} ${8:04X} +Length Counter - Reload Value: {9:>4} ${9:04X} Enabled: {10} -Timer: {11:>3} ${11:04X} -Duty Position: {12:>3} ${12:02X} -Length Counter - Counter: {13:>3} ${13:02X} -Envelope - Counter: {14:>3} ${14:02X} -Envelope - Divider: {15:>3} ${15:02X} -Output: {16:>3} ${16:02X} +Timer: {11:>4} ${11:04X} +Duty Position: {12:>4} ${12:02X} +Length Counter - Counter: {13:>4} ${13:02X} +Envelope - Counter: {14:>4} ${14:02X} +Envelope - Divider: {15:>4} ${15:02X} +Output: {16:>4} ${16:02X} ", self.duty_vol.volume(), self.duty_vol.const_vol(), @@ -242,14 +267,12 @@ Output: {16:>3} ${16:02X} 0, self.enabled, self.period_timer, - self.cur, // ? + self.cur, // ? self.counter.current, self.envelope_counter, self.envelope_divider, self.cur_sample(), ) - .font(Font::MONOSPACE) - .into() } } @@ -344,8 +367,8 @@ impl TriangleChannel { self.q_frame_clock(); } - pub fn view(&self) -> Element<'_, T> { - text!( + pub fn view(&self) -> String { + format!( "Triangle Channel Linear Counter - Reload: {0:>3} ${0:02X} Linear Counter - Halted: {1} @@ -372,8 +395,6 @@ Output: {10:>3} ${10:02X} self.reload, self.cur_sample(), ) - .font(Font::MONOSPACE) - .into() } } @@ -465,8 +486,8 @@ impl NoiseChannel { self.q_frame_clock(); } - pub fn view(&self) -> Element<'_, T> { - text!("").font(Font::MONOSPACE).into() + pub fn view(&self) -> String { + format!("") } } @@ -505,8 +526,8 @@ impl DeltaChannel { false } - pub fn view(&self) -> Element<'_, T> { - text!("").font(Font::MONOSPACE).into() + pub fn view(&self) -> String { + format!("") } } @@ -544,8 +565,8 @@ impl std::fmt::Debug for APU { impl APU { pub fn init() -> Self { Self { - pulse_1: PulseChannel::new(), - pulse_2: PulseChannel::new(), + pulse_1: PulseChannel::new(1), + pulse_2: PulseChannel::new(0), triangle: TriangleChannel::new(), noise: NoiseChannel::new(), dmc: DeltaChannel::new(), @@ -695,15 +716,26 @@ impl APU { pub fn irq_waiting(&mut self) -> bool { self.frame_counter.irq } +} - pub fn view<'s, T: 's>(&'s self) -> Element<'s, T> { - column![ - self.pulse_1.view(), - self.pulse_2.view(), - self.triangle.view(), - self.noise.view(), - self.dmc.view(), - ] - .into() +#[cfg(feature = "iced")] +mod apu_iced { + use super::*; + use iced::{ + Element, Font, + widget::{column, text}, + }; + + impl APU { + pub fn view<'s, T: 's>(&'s self) -> Element<'s, T> { + column![ + text(self.pulse_1.view()).font(Font::MONOSPACE), + text(self.pulse_2.view()).font(Font::MONOSPACE), + text(self.triangle.view()).font(Font::MONOSPACE), + text(self.noise.view()).font(Font::MONOSPACE), + text(self.dmc.view()).font(Font::MONOSPACE), + ] + .into() + } } } diff --git a/src/audio.rs b/src/bin/native/audio.rs similarity index 100% rename from src/audio.rs rename to src/bin/native/audio.rs diff --git a/src/debugger.rs b/src/bin/native/debugger.rs similarity index 96% rename from src/debugger.rs rename to src/bin/native/debugger.rs index 96b9c57..c8517f3 100644 --- a/src/debugger.rs +++ b/src/bin/native/debugger.rs @@ -23,8 +23,7 @@ use iced::{ scrollable, text, }, }; - -use crate::{Break, CycleResult, NES, PPU, mem::Mapped}; +use nes_emu::{Break, CycleResult, Mapped, NES, PPU}; #[derive(Debug, Clone)] pub struct DebuggerState { @@ -86,6 +85,8 @@ where text(format!("{val:032b}")) } +type Type = NES; + impl DebuggerState { pub fn new() -> Self { Self { @@ -106,23 +107,23 @@ impl DebuggerState { row![column![ text("Status"), row![ - labelled("A:", text(format!("{:02X}", nes.cpu.a))), - labelled("X:", text(format!("{:02X}", nes.cpu.x))), - labelled("Y:", text(format!("{:02X}", nes.cpu.y))), - labelled("PC:", text(format!("{:04X}", nes.cpu.pc))), + labelled("A:", text(format!("{:02X}", nes.cpu().a))), + labelled("X:", text(format!("{:02X}", nes.cpu().x))), + labelled("Y:", text(format!("{:02X}", nes.cpu().y))), + labelled("PC:", text(format!("{:04X}", nes.cpu().pc))), labelled("Cycle:", text(format!("{}", nes.cpu_cycle()))), - labelled("SP:", text(format!("{:02X}", nes.cpu.sp))), + labelled("SP:", text(format!("{:02X}", nes.cpu().sp))), ] .spacing(5.), row![ - labelled("P:", text(format!("{:02X}", nes.cpu.status.0))), - labelled_box("Carry", nes.cpu.status.carry()), - labelled_box("Zero", nes.cpu.status.zero()), - labelled_box("Interrupt", nes.cpu.status.interrupt_disable()), + labelled("P:", text(format!("{:02X}", nes.cpu().status.0))), + labelled_box("Carry", nes.cpu().status.carry()), + labelled_box("Zero", nes.cpu().status.zero()), + labelled_box("Interrupt", nes.cpu().status.interrupt_disable()), labelled_box("--", false), labelled_box("--", false), - labelled_box("Overflow", nes.cpu.status.overflow()), - labelled_box("Negative", nes.cpu.status.negative()), + labelled_box("Overflow", nes.cpu().status.overflow()), + labelled_box("Negative", nes.cpu().status.negative()), ] .spacing(5.), row![ @@ -246,7 +247,7 @@ impl DebuggerState { .into() } - fn run_n_clock_cycles(nes: &mut NES, n: usize) { + fn run_n_clock_cycles(nes: &mut Type, n: usize) { for _ in 0..n { if nes.run_one_clock_cycle(&Break::default()).dbg_int || nes.halted() { break; @@ -321,7 +322,7 @@ impl DebuggerState { ppu_scanline: true, ..Break::default() }, - |_, n| n.ppu.scanline == self.to_scan_line, + |_, n| n.ppu().scanline == self.to_scan_line, ), DebuggerMessage::RunFrames => Self::run_n_clock_cycles(nes, self.frames * 341 * 262), DebuggerMessage::RunBreakpoint => Self::run_until( @@ -330,7 +331,7 @@ impl DebuggerState { break_points: vec![self.breakpoint as u16], ..Break::default() }, - |_, nes| nes.cpu.pc as usize == self.breakpoint, + |_, nes| nes.cpu().pc as usize == self.breakpoint, ), // DebuggerMessage::Run => { // Self::run_until(nes, &Break { ..Break::default() }, |_, nes| nes.halted()) diff --git a/src/header_menu.rs b/src/bin/native/header_menu.rs similarity index 100% rename from src/header_menu.rs rename to src/bin/native/header_menu.rs diff --git a/src/hex_view.rs b/src/bin/native/hex_view.rs similarity index 90% rename from src/hex_view.rs rename to src/bin/native/hex_view.rs index 6e6854f..2019eb7 100644 --- a/src/hex_view.rs +++ b/src/bin/native/hex_view.rs @@ -1,42 +1,25 @@ use std::{ - fmt::{self, Display}, - sync::Arc, + fmt::{self, Display}, ops::Deref }; use iced::{ - Element, Fill, Font, Padding, Task, - advanced::graphics::text::{ - FontSystem, - cosmic_text::{ - Attrs, Family, Metrics, - fontdb::{ID, Query}, - }, - font_system, - }, - keyboard::{Key, key::Named}, - mouse::{Button, ScrollDelta}, - widget::{column, lazy, row, text}, -}; -use iced_core::{ - Clipboard, Color, Event, Layout, Length, Pixels, Point, Rectangle, Shell, Size, Text, Vector, - Widget, - layout::{Limits, Node}, - mouse::{Cursor, Interaction}, - overlay, - renderer::{Quad, Style}, - widget::{ - Operation, Tree, - tree::{State, Tag}, - }, + advanced::{layout::{Limits, Node}, overlay, renderer::{Quad, Style}, text::Renderer, widget::{tree::{State, Tag}, Operation, Tree}, Clipboard, Layout, Shell, Text, Widget}, alignment::Vertical, keyboard::{key::Named, Key}, mouse::{Button, Cursor, Interaction, ScrollDelta}, widget::{column, lazy, text}, Color, Element, Event, Fill, Font, Length, Padding, Pixels, Point, Rectangle, Size, Task, Vector }; +// use iced_core::{ +// Clipboard, Color, Event, Layout, Length, Pixels, Point, Rectangle, Shell, Size, Text, Vector, +// Widget, +// layout::{Limits, Node}, +// mouse::{Cursor, Interaction}, +// overlay, +// renderer::{Quad, Style}, +// widget::{ +// Operation, Tree, +// tree::{State, Tag}, +// }, +// }; +use nes_emu::Memory; -use crate::{PPU, mem::Mapped, ppu::PPUMMRegisters}; - -pub trait Memory { - fn peek(&self, val: usize) -> Option; - fn len(&self) -> usize; - fn edit_ver(&self) -> usize; -} +use nes_emu::{PPU, Mapped, PPUMMRegisters}; #[derive(Debug, Clone, Copy)] struct Cpu<'a>(&'a Mapped); @@ -169,12 +152,22 @@ impl HexView { } } +pub struct BufferSlice<'a>(pub &'a [u8]); + +impl Deref for BufferSlice<'_> { + type Target = [u8]; + + fn deref(&self) -> &Self::Target { + self.0 + } +} + pub trait Buffer { fn peek(&self, val: usize) -> Option; fn len(&self) -> usize; } -impl Buffer for &[u8] { +impl Buffer for BufferSlice<'_> { fn peek(&self, val: usize) -> Option { self.get(val).copied() } @@ -193,7 +186,7 @@ impl Buffer for M { } } -pub fn hex_editor(raw: B) -> HexEditor { +pub fn hex_editor(raw: B) -> HexEditor { HexEditor { val: raw, on_edit: None, @@ -209,7 +202,7 @@ pub struct HexEdit { new_value: u8, } -pub struct HexEditor { +pub struct HexEditor { val: B, font_size: Option, font: Option, @@ -218,7 +211,7 @@ pub struct HexEditor { impl HexEditor where - R: iced_core::text::Renderer, + R: Renderer, { pub fn font(mut self, font: R::Font) -> Self { self.font = Some(font); @@ -228,7 +221,7 @@ where impl HexEditor where - R: iced_core::text::Renderer, + R: Renderer, { fn value_bounds(&self, renderer: &R, layout: Layout<'_>) -> Rectangle { let size = self.font_size.unwrap_or(renderer.default_size()); @@ -296,7 +289,7 @@ const LINE_HEIGHT: f32 = 1.3; impl Widget for HexEditor where - R: iced_core::text::Renderer, + R: Renderer, { fn tag(&self) -> Tag { Tag::of::() @@ -354,10 +347,10 @@ where size, line_height: size.into(), font, - align_x: iced_core::text::Alignment::Left, - align_y: iced_core::alignment::Vertical::Top, - shaping: iced_core::text::Shaping::Basic, - wrapping: iced_core::text::Wrapping::None, + align_x: iced::advanced::text::Alignment::Left, + align_y: Vertical::Top, + shaping: iced::advanced::text::Shaping::Basic, + wrapping: iced::advanced::text::Wrapping::None, hint_factor: None, }, pos, @@ -444,10 +437,10 @@ where size, line_height: size.into(), font, - align_x: iced_core::text::Alignment::Left, - align_y: iced_core::alignment::Vertical::Top, - shaping: iced_core::text::Shaping::Basic, - wrapping: iced_core::text::Wrapping::None, + align_x: iced::advanced::text::Alignment::Left, + align_y: Vertical::Top, + shaping: iced::advanced::text::Shaping::Basic, + wrapping: iced::advanced::text::Wrapping::None, hint_factor: None, }, pos, diff --git a/src/main.rs b/src/bin/native/main.rs similarity index 97% rename from src/main.rs rename to src/bin/native/main.rs index dd1bb91..349c256 100644 --- a/src/main.rs +++ b/src/bin/native/main.rs @@ -19,14 +19,19 @@ use iced::{ }; use nes_emu::{ Break, NES, - audio::Audio, - debugger::{DbgImage, DebuggerMessage, DebuggerState, dbg_image}, - header_menu::header_menu, - hex_view::{HexEvent, HexView}, - resize_watcher::resize_watcher, }; use tokio::{io::AsyncWriteExt, runtime::Runtime}; use tracing_subscriber::EnvFilter; +mod debugger; +use debugger::{DbgImage, DebuggerMessage, DebuggerState, dbg_image}; +mod resize_watcher; +use resize_watcher::resize_watcher; +mod header_menu; +use header_menu::header_menu; +mod hex_view; +use hex_view::{HexEvent, HexView}; +mod audio; +use audio::Audio; // const ROM_FILE: &str = concat!(env!("ROM_DIR"), "/", "even_odd.nes"); // const ROM_FILE: &str = concat!(env!("ROM_DIR"), "/", "crc_check.nes"); @@ -151,6 +156,7 @@ impl Emulator { fn new() -> (Self, Task) { let mut nes = nes_emu::NES::load_nes_file(ROM_FILE).expect("Failed to load nes file"); nes.reset(); + nes.debug_log_mut().enable(); let (win, task) = iced::window::open(Settings { min_size: None, ..Settings::default() @@ -234,7 +240,10 @@ impl Emulator { .and_then(|p| { Task::future(async move { // println!("Opening: {}", p.path().display()); - NES::async_load_nes_file(p.path()).await.ok() + NES::async_load_nes_file(p.path()).await.ok().map(|mut nes| { + nes.debug_log_mut().enable(); + nes + }) }) }) .and_then(|n| Task::done(Message::OpenRom(n))); @@ -375,7 +384,7 @@ impl Emulator { && !self.nes.halted() { count += 1; - if count > 100000 { + if count > 90_000 { println!("Loop overran..."); break; } diff --git a/src/resize_watcher.rs b/src/bin/native/resize_watcher.rs similarity index 100% rename from src/resize_watcher.rs rename to src/bin/native/resize_watcher.rs diff --git a/src/bin/wasm/main.rs b/src/bin/wasm/main.rs new file mode 100644 index 0000000..d54480a --- /dev/null +++ b/src/bin/wasm/main.rs @@ -0,0 +1,300 @@ +use std::sync::{ + Arc, Mutex, + atomic::{AtomicBool, Ordering}, +}; + +use log::info; +use nes_emu::{Break, NES}; +#[cfg(not(target_arch = "wasm32"))] +use tracing_subscriber::EnvFilter; +use web_sys::{ + js_sys::{Function, Uint8Array}, wasm_bindgen::{closure::Closure, Clamped, JsValue, UnwrapThrowExt}, window, AudioBuffer, AudioBufferOptions, AudioContext, AudioContextOptions, AudioContextState, CanvasRenderingContext2d, HtmlButtonElement, HtmlCanvasElement, HtmlInputElement, ImageBitmap, ImageData, KeyboardEvent +}; + +const DEFAULT_ROM: &[u8] = include_bytes!(concat!( + env!("ROM_DIR"), + "/input_test.nes" // TODO: select default rom +)); + +pub fn main() { + #[cfg(target_arch = "wasm32")] + { + console_log::init().expect("Initialize logger"); + std::panic::set_hook(Box::new(console_error_panic_hook::hook)); + } + #[cfg(not(target_arch = "wasm32"))] + tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .init(); + + let win = window().expect_throw("Window is undefined"); + let doc = win.document().expect_throw("Document is undefined"); + let canvas = doc + .get_element_by_id("main_view") + .expect_throw("Failed to get canvas element"); + let canvas = HtmlCanvasElement::from(JsValue::from(canvas)); + + let ctx = + CanvasRenderingContext2d::from(JsValue::from(canvas.get_context("2d").unwrap().unwrap())); + let cl = Arc::new(Closure::new(move |image| { + ctx.reset(); + ctx.draw_image_with_image_bitmap(&ImageBitmap::from(image), 0., 0.) + .expect_throw("Failed to draw image"); + })); + let audio_ctx_opts = AudioContextOptions::new(); + audio_ctx_opts.set_sample_rate(60. * 3723.); + // audio_ctx_opts.set_ + let audio = AudioContext::new_with_context_options(&audio_ctx_opts) + .expect_throw("Failed to create audio context"); + let _ = audio.suspend().expect_throw("Failed to suspend AudioCtx"); + + const BUFFER_SIZE: usize = 1 << 10; + const SAMPLE_RATE: f64 = 60. * 3723.; + let audio_buffer_opts = AudioBufferOptions::new(BUFFER_SIZE as u32, SAMPLE_RATE as f32); + audio_buffer_opts.set_number_of_channels(1); + // let audio_buffer = + // AudioBuffer::new(&audio_buffer_opts).expect_throw("Failed to create audio buffer"); + // let mut raw_buf = [0.; BUFFER_SIZE]; + // for i in 0..raw_buf.len() { + // raw_buf[i] = (i as f32 / 200.).sin() + // } + // audio_buffer + // .copy_to_channel(&raw_buf, 0) + // .expect_throw("Failed to copy audio data"); + let gain_node = audio + .create_gain() + .expect_throw("Failed to create gain node"); + gain_node.set_channel_count(1); + gain_node.gain().set_value(0.01); + gain_node + .connect_with_audio_node_and_output(&audio.destination(), 0) + .expect_throw("Failed to connect to audio destination"); + // gain_node + // .connect_with_audio_node_and_output(&audio.destination(), 1) + // .expect_throw("Failed to connect to audio destination 2"); + let delay_node = audio + .create_delay() + .expect_throw("Failed to create delay node"); + delay_node.set_channel_count(1); + delay_node.delay_time().set_value(0.); + delay_node + .connect_with_audio_node(&gain_node) + .expect_throw("Failed to connect to audio destination"); + // source_node.start_with_when(when) + + let nes = Arc::new(Mutex::new({ + let mut n = NES::load_nes_file_mem(DEFAULT_ROM).unwrap(); + n.reset(); + + n + })); + // let timeout = Arc::new(Mutex::new(None as Option)); + let poisoned = Arc::new(AtomicBool::new(false)); + // let timeout_cpy = timeout.clone(); + + { + let audio = audio.clone(); + let el = doc.get_element_by_id("pause").unwrap(); + let element = HtmlButtonElement::from(JsValue::from(el.clone())); + let f: Closure = Closure::new(move |_e| { + if audio.state() == AudioContextState::Suspended { + let _ = audio.resume(); + element.set_inner_text("Pause"); + } else { + let _ = audio.suspend(); + element.set_inner_text("Play"); + } + }); + el.add_event_listener_with_callback("click", &Function::from(f.into_js_value())) + .expect_throw("Failed to setup pause callback"); + } + { + let nes = nes.clone(); + let poisoned = poisoned.clone(); + let element = HtmlInputElement::from(JsValue::from(doc.get_element_by_id("file").unwrap())); + element.set_accept(".nes"); + let load: Closure = Closure::new(move |v| { + let v = Uint8Array::from(v); + // info!("{v:?}"); + let new_emu = NES::load_nes_file_mem(&v.to_vec()).expect("Failed to load nes file"); + if poisoned.swap(true, Ordering::AcqRel) == false { + let mut nes = nes.lock().unwrap(); + *nes = new_emu; + nes.power_cycle(); + if poisoned.swap(false, Ordering::AcqRel) == true {} + } + }); + let f: Closure = Closure::new(move |_e| { + if let Some(file) = element.files().and_then(|l| l.get(0)) { + let _ = file.bytes().then(&load); + } + }); + doc.get_element_by_id("load") + .unwrap() + .add_event_listener_with_callback("click", &Function::from(f.into_js_value())) + .expect_throw("Failed to setup pause callback"); + } + { + let nes = nes.clone(); + let poisoned = poisoned.clone(); + let f: Closure = Closure::new(move |e| { + if poisoned.swap(true, Ordering::AcqRel) == false { + let e = KeyboardEvent::from(e); + let key = e.key(); + // info!("{}", key); + if key == "ArrowLeft" { + nes.lock().unwrap().controller_1().set_left(true); + } else if key == "ArrowRight" { + nes.lock().unwrap().controller_1().set_right(true); + } else if key == "ArrowUp" { + nes.lock().unwrap().controller_1().set_up(true); + } else if key == "ArrowDown" { + nes.lock().unwrap().controller_1().set_down(true); + } else if key == "a" || key == "A" { + nes.lock().unwrap().controller_1().set_a(true); + } else if key == "s" || key == "S" { + nes.lock().unwrap().controller_1().set_b(true); + } else if key == "q" || key == "Q" { + nes.lock().unwrap().controller_1().set_start(true); + } else if key == "w" || key == "W" { + nes.lock().unwrap().controller_1().set_select(true); + } + if poisoned.swap(false, Ordering::AcqRel) == true {} + } + }); + win.set_onkeydown(Some(&Function::from(f.into_js_value()))); + } + { + let nes = nes.clone(); + let poisoned = poisoned.clone(); + let f: Closure = Closure::new(move |e| { + if poisoned.swap(true, Ordering::AcqRel) == false { + let e = KeyboardEvent::from(e); + let key = e.key(); + // info!("{}", key); + if key == "ArrowLeft" { + nes.lock().unwrap().controller_1().set_left(false); + } else if key == "ArrowRight" { + nes.lock().unwrap().controller_1().set_right(false); + } else if key == "ArrowUp" { + nes.lock().unwrap().controller_1().set_up(false); + } else if key == "ArrowDown" { + nes.lock().unwrap().controller_1().set_down(false); + } else if key == "a" || key == "A" { + nes.lock().unwrap().controller_1().set_a(false); + } else if key == "s" || key == "S" { + nes.lock().unwrap().controller_1().set_b(false); + } else if key == "q" || key == "Q" { + nes.lock().unwrap().controller_1().set_start(false); + } else if key == "w" || key == "W" { + nes.lock().unwrap().controller_1().set_select(false); + } + if poisoned.swap(false, Ordering::AcqRel) == true {} + } + }); + win.set_onkeyup(Some(&Function::from(f.into_js_value()))); + } + + // let timeline = win.document().unwrap().timeline(); + let mut last_frame = audio.current_time(); + let mut raw_audio_buffer = [0f32; BUFFER_SIZE]; + let mut cur_pos = 0; + let mut cur_total = BUFFER_SIZE; // Start time in samples, set to buffer size... + let period = Arc::new(Mutex::new(None as Option)); + let period_cl = period.clone(); + let periodic: Closure = Closure::new(move |_v| { + let win = window().expect_throw("Window is undefined"); + const FRAME_TIME: f64 = 1. / 60.; + let mut cancel = false; + if last_frame + FRAME_TIME > audio.current_time() { + last_frame += FRAME_TIME; + if audio.state() == AudioContextState::Running { + if poisoned.swap(true, Ordering::AcqRel) { + cancel = true; + // if let Some(_id) = timeout_cpy.lock().ok().and_then(|v| *v) { + // win.clear_interval_with_handle(id); + // win.cancel_animation_frame(id); + info!("Cleared interval due to poison"); + // } else { + // info!("Not yet set id"); + // } + } else { + let mut n = nes.lock().unwrap(); + // info!("Running frame"); + let mut count = 0; + while !n.halted() && !n.run_one_clock_cycle(&Break::default()).ppu_frame { + count += 1; + if count > 90_000 { + info!("Loop overran"); + break; + } + } + info!("New samples: {}", n.apu().get_frame_samples().len()); + // for s in n.apu().get_frame_samples() { + // // raw_audio_buffer[cur_pos] = ((*s as f32) - 127.5) / 128.; + // raw_audio_buffer[cur_pos] = (*s as f32) / 256.; + // cur_pos += 1; + // if cur_pos == BUFFER_SIZE { + // cur_pos = 0; + // cur_total += BUFFER_SIZE; + // let audio_buffer = AudioBuffer::new(&audio_buffer_opts) + // .expect_throw("Failed to create audio buffer"); + // audio_buffer + // .copy_to_channel(&raw_audio_buffer, 0) + // .expect_throw("Failed to copy audio data"); + // // info!("S: {:?}", audio_buffer.get_channel_data(0)); + + // let source_node = audio + // .create_buffer_source() + // .expect_throw("Failed to create buffer source"); + // source_node.set_loop(true); + // source_node.set_buffer(Some(&audio_buffer)); + // source_node + // .connect_with_audio_node(&gain_node) + // .expect_throw("Failed to connect to gain node"); + // source_node + // .start_with_when((cur_total as f64) / SAMPLE_RATE) + // .expect_throw("Failed to start source_node"); + // info!( + // "At {cur_total} samples, {:02.04}s ahead", + // (cur_total as f64) / SAMPLE_RATE - audio.current_time() + // ); + // // TODO: create and play audio node + // } + // } + n.apu_mut().reset_frame_samples(); // Discard audio samples + // info!("Completed Frame in {} cycles", count); + let data = Clamped(n.ppu().render_buffer.raw_image()); + // info!("Creating bitmap"); + let image = ImageData::new_with_u8_clamped_array(data, 256) + .expect_throw("Image data could not be created"); + + let data = win + .create_image_bitmap_with_image_data(&image) + .expect_throw("Bitmap could not be created"); + + let _ = data.then(&cl); + drop(n); + if !poisoned.swap(false, Ordering::AcqRel) { + panic!("Poisoned logic invalid"); + } + } + } + } + if !cancel { + win.request_animation_frame(period_cl.lock().unwrap().as_ref().unwrap()) + .expect_throw("Failed to setup animation frame"); + } + }); + let js = Function::from(periodic.into_js_value()); + let win = window().expect_throw("Window is undefined"); + // let timeout_id = win + // .set_interval_with_callback_and_timeout_and_arguments_0(&Function::from(js), 16) + // .expect_throw("Failed to setup timeout"); + // let timeout_id = + win + .request_animation_frame(&js) + .expect_throw("Failed to setup animation frame"); + *period.lock().unwrap() = Some(js); + // *timeout.lock().unwrap() = Some(timeout_id); +} diff --git a/src/debug.rs b/src/debug.rs index f2786c3..5fc55e1 100644 --- a/src/debug.rs +++ b/src/debug.rs @@ -2,6 +2,7 @@ use std::num::NonZeroUsize; #[derive(Debug, Clone)] pub struct DebugLog { + enabled: bool, current: String, history: Vec, max_history: Option, @@ -11,6 +12,7 @@ pub struct DebugLog { impl DebugLog { pub fn new() -> Self { Self { + enabled: false, current: String::new(), history: vec![], max_history: None, @@ -47,25 +49,41 @@ impl DebugLog { pub fn pop(&mut self) -> Option { self.history.pop() } + + pub fn enable(&mut self) { + self.enabled = true; + } } impl std::fmt::Write for DebugLog { fn write_str(&mut self, s: &str) -> std::fmt::Result { - let tmp = self.current.write_str(s); - self.rotate(); - tmp + if self.enabled { + let tmp = self.current.write_str(s); + self.rotate(); + tmp + } else { + Ok(()) + } } fn write_char(&mut self, c: char) -> std::fmt::Result { - let tmp = self.current.write_char(c); - self.rotate(); - tmp + if self.enabled { + let tmp = self.current.write_char(c); + self.rotate(); + tmp + } else { + Ok(()) + } } fn write_fmt(&mut self, args: std::fmt::Arguments<'_>) -> std::fmt::Result { - let tmp = self.current.write_fmt(args); - self.rotate(); - tmp + if self.enabled { + let tmp = self.current.write_fmt(args); + self.rotate(); + tmp + } else { + Ok(()) + } } } diff --git a/src/lib.rs b/src/lib.rs index 3687480..a8c99ac 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,18 +2,19 @@ mod apu; mod controllers; mod cpu; pub mod debug; -pub mod debugger; -pub mod header_menu; -pub mod hex_view; +// pub mod debugger; +// pub mod header_menu; +// pub mod hex_view; mod mem; mod ppu; -pub mod resize_watcher; #[cfg(test)] mod test_roms; -pub mod audio; +pub use mem::{Memory, Mapped}; -pub use ppu::{Color, PPU, RenderBuffer}; -use tokio::io::AsyncReadExt as _; +pub use ppu::{Color, PPU, RenderBuffer, PPUMMRegisters}; +pub use cpu::{Cpu, CycleResult, CPUMMRegisters}; +// #[cfg(not(target_arch = "wasm32"))] +// use tokio::io::AsyncReadExt as _; use std::{fs::File, io::Read, path::Path}; @@ -22,9 +23,9 @@ use thiserror::Error; use crate::{ apu::APU, controllers::{ControllerState, Controllers}, - cpu::{CPUMMRegisters, ClockState, Cpu, CycleResult, DmaState}, + cpu::{ClockState, DmaState}, debug::DebugLog, - mem::{CpuMem, Mapped, PpuMem}, + mem::{CpuMem, PpuMem}, }; #[derive(Error, Debug)] @@ -115,13 +116,18 @@ impl std::fmt::Debug for NES { } impl NES { + #[cfg(feature = "fs")] pub fn load_nes_file(file: impl AsRef) -> Result { let mut raw = Vec::new(); File::open(file)?.read_to_end(&mut raw)?; Self::load_nes_file_mem(&raw) } + // #[cfg(not(target_arch = "wasm32"))] + #[cfg(all(feature = "fs", feature = "tokio"))] pub async fn async_load_nes_file(file: impl AsRef) -> Result { + use tokio::io::AsyncReadExt as _; + let mut raw = Vec::new(); tokio::fs::File::open(file) .await? @@ -342,6 +348,10 @@ impl NES { &self.ppu.render_buffer } + pub fn cpu(&self) -> &Cpu { + &self.cpu + } + pub fn ppu(&self) -> &PPU { &self.ppu } diff --git a/src/mem.rs b/src/mem.rs index b0b3482..4aa4f94 100644 --- a/src/mem.rs +++ b/src/mem.rs @@ -1,10 +1,16 @@ use std::{fmt, sync::Arc}; use crate::{ - CPUMMRegisters, PPU, apu::APU, controllers::Controllers, cpu::DmaState, hex_view::Memory, + CPUMMRegisters, PPU, apu::APU, controllers::Controllers, cpu::DmaState, ppu::PPUMMRegisters, }; +pub trait Memory { + fn peek(&self, val: usize) -> Option; + fn len(&self) -> usize; + fn edit_ver(&self) -> usize; +} + #[derive(Debug, Clone)] pub enum Value { Value(u8), diff --git a/src/ppu.rs b/src/ppu.rs index ecd17f1..8c76e66 100644 --- a/src/ppu.rs +++ b/src/ppu.rs @@ -1,11 +1,6 @@ use std::fmt; use bytes::{Bytes, BytesMut}; -use iced::{ - Point, Size, - advanced::graphics::geometry::Renderer, - widget::canvas::{Fill, Frame}, -}; use crate::mem::{Mapped, PpuMem, Value}; @@ -16,12 +11,6 @@ pub struct Color { pub b: u8, } -impl Into for Color { - fn into(self) -> Fill { - iced::Color::from_rgb8(self.r, self.g, self.b).into() - } -} - impl fmt::Display for Color { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "#{:02X}{:02X}{:02X}", self.r, self.g, self.b) @@ -66,6 +55,10 @@ impl RenderBuffer { Bytes::copy_from_slice(&self.raw_rgba) } + pub fn raw_image(&self) -> &[u8] { + &self.raw_rgba + } + pub fn assert_eq(&self, other: &Self) { // if self.buffer != other.buffer { for y in 0..H { @@ -1126,238 +1119,6 @@ impl PPU { pub fn oam_edit_ver(&self) -> usize { self.oam.edit_ver } - - pub fn render_name_table(&self, mem: &Mapped, frame: &mut Frame) { - for y in 0..60 { - for x in 0..64 { - let row = y % 30; - let col = x % 32; - let off = 0x2000 + 0x400 * (y / 30 * 2 + x / 32); - let name = mem.peek_ppu((off + col + row * 32) as u16).unwrap() as u16 * 16 - + if self.background.second_pattern { - 0x1000 - } else { - 0 - }; - let attr = mem - .peek_ppu((col / 4 + row / 4 * 8 + 0x3C0 + off) as u16) - .unwrap(); - // attr << (((col & 1) << 1) | ((row & 1) << 0)) * 2 - // let h_off = ((self.pixel - 1) / 16) % 2; - // let v_off = (self.scanline / 16) % 2; - // let off = v_off * 4 + h_off * 2; - let palette = (attr >> (((col & 2) << 0) | ((row & 2) << 1))) & 0x3; - for y_off in 0..8 { - let low = mem.peek_ppu(name + y_off).unwrap(); - let high = mem.peek_ppu(name + y_off + 8).unwrap(); - for bit in 0..8 { - frame.fill_rectangle( - Point::new( - x as f32 * 8. + 8. - bit as f32, - y as f32 * 8. + y_off as f32, - ), - Size::new(1., 1.), - match (low & (1 << bit) != 0, high & (1 << bit) != 0) { - (false, false) => self.palette.color(0), - (true, false) => self.palette.color(1 + 4 * palette), - (false, true) => self.palette.color(2 + 4 * palette), - (true, true) => self.palette.color(3 + 4 * palette), - // (false, false) => Color { r: 0, g: 0, b: 0 }, - // (true, false) => Color { - // r: 64, - // g: 64, - // b: 64, - // }, - // (false, true) => Color { - // r: 128, - // g: 128, - // b: 128, - // }, - // (true, true) => Color { - // r: 255, - // g: 255, - // b: 255, - // }, - }, - ); - } - } - // for - // let pat = mem.peek(); - } - } - } - pub fn name_cursor_info(&self, mem: &Mapped, cursor: Point) -> Option { - let x = (cursor.x / 8.) as usize; - let y = (cursor.y / 8.) as usize; - if x < 64 && y < 60 { - let row = y % 30; - let col = x % 32; - let off = 0x2000 + 0x400 * (y / 30 * 2 + x / 32); - let name = mem.peek_ppu((off + col + row * 32) as u16).unwrap() as usize; - let attr = mem - .peek_ppu((col / 4 + row / 4 * 8 + 0x3C0 + off) as u16) - .unwrap(); - Some(format!( - "Row, Column: {}, {} -X, Y: {}, {} -Tilemap address: ${:04X} - -Tile Index: ${:02X} -Tile Address (PPU): ${:04X} -Tile Address (CHR): ${:04X} - -Palette Index {} -Palette Address ${:04X} - -Attribute Address ${:04X} -Attribute data: ${:02X} -", - row, - col, - col * 8, - row * 8, - off + col + row * 32, - name, - name * 16 - + if self.background.second_pattern { - 0x1000 - } else { - 0 - }, - name * 16 - + if self.background.second_pattern { - 0x1000 - } else { - 0 - }, - (attr >> (((col & 1) << 1) | ((row & 1) << 2))) & 0x3, - ((attr >> (((col & 1) << 1) | ((row & 1) << 2))) & 0x3) as usize * 4 + 0x3F00, - col / 4 + row / 4 * 8 + 0x3C0 + off, - attr, - )) - } else { - None - } - } - - pub fn render_pattern_tables(&self, mem: &Mapped, frame: &mut Frame) { - for y in 0..16 { - for x in 0..16 { - let name = (y * 16 + x) * 16; - for y_off in 0..8 { - let low = mem.peek_ppu(name + y_off).unwrap(); - let high = mem.peek_ppu(name + y_off + 8).unwrap(); - for bit in 0..8 { - frame.fill_rectangle( - Point::new( - x as f32 * 8. + 8. - bit as f32, - y as f32 * 8. + y_off as f32, - ), - Size::new(1., 1.), - match (low & (1 << bit) != 0, high & (1 << bit) != 0) { - (false, false) => Color { r: 0, g: 0, b: 0 }, - (true, false) => Color { - r: 64, - g: 64, - b: 64, - }, - (false, true) => Color { - r: 128, - g: 128, - b: 128, - }, - (true, true) => Color { - r: 255, - g: 255, - b: 255, - }, - }, - ); - } - } - } - } - - for y in 0..16 { - for x in 0..16 { - let name = (y * 16 + x) * 16; - for y_off in 0..8 { - let low = mem.peek_ppu(name + y_off + 0x1000).unwrap(); - let high = mem.peek_ppu(name + y_off + 8 + 0x1000).unwrap(); - for bit in 0..8 { - frame.fill_rectangle( - Point::new( - x as f32 * 8. + 8. - bit as f32, - y as f32 * 8. + y_off as f32 + 130., - ), - Size::new(1., 1.), - match (low & (1 << bit) != 0, high & (1 << bit) != 0) { - (false, false) => Color { r: 0, g: 0, b: 0 }, - (true, false) => Color { - r: 64, - g: 64, - b: 64, - }, - (false, true) => Color { - r: 128, - g: 128, - b: 128, - }, - (true, true) => Color { - r: 255, - g: 255, - b: 255, - }, - }, - ); - } - } - // for - // let pat = mem.peek(); - } - } - } - pub fn pattern_cursor_info(&self, cursor: Point) -> Option { - let x = (cursor.x / 8.) as usize; - let y = (cursor.y / 8.) as usize; - if x < 16 && y < 32 { - Some(format!( - "Tile address (PPU): {:04X}\nTile address (CHR): {:04X}\nIndex: {:02X}", - (y * 16 + x) * 16, - (y * 16 + x) * 16, - ((y % 16) * 16 + x), - )) - } else { - None - } - } - - pub fn render_palette(&self, frame: &mut Frame) { - for y in 0..8 { - for x in 0..4 { - frame.fill_rectangle( - Point::new(x as f32 * 10., y as f32 * 10.), - Size::new(10., 10.), - self.palette.colors[(self.palette.ram[x + y * 4] & 0x3F) as usize], - ); - } - } - } - pub fn palette_cursor_info(&self, cursor: Point) -> Option { - let x = (cursor.x / 10.) as usize; - let y = (cursor.y / 10.) as usize; - if x < 4 && y < 8 { - Some(format!( - "Index: {:02X}\nValue: {:02X}\nColor code: {}", - x + y * 4, - self.palette.ram[x + y * 4] & 0x3F, - self.palette.colors[(self.palette.ram[x + y * 4] & 0x3F) as usize], - )) - } else { - None - } - } } #[cfg(test)] @@ -1414,3 +1175,253 @@ mod tests { assert_eq!(ppu.background.w, false); } } + +#[cfg(feature = "iced")] +mod ppu_iced { + use super::*; + use iced::{ + Point, Size, + advanced::graphics::geometry::Renderer, + widget::canvas::{Fill, Frame}, + }; + + impl Into for Color { + fn into(self) -> Fill { + iced::Color::from_rgb8(self.r, self.g, self.b).into() + } + } + + impl PPU { + pub fn render_name_table(&self, mem: &Mapped, frame: &mut Frame) { + for y in 0..60 { + for x in 0..64 { + let row = y % 30; + let col = x % 32; + let off = 0x2000 + 0x400 * (y / 30 * 2 + x / 32); + let name = mem.peek_ppu((off + col + row * 32) as u16).unwrap() as u16 * 16 + + if self.background.second_pattern { + 0x1000 + } else { + 0 + }; + let attr = mem + .peek_ppu((col / 4 + row / 4 * 8 + 0x3C0 + off) as u16) + .unwrap(); + // attr << (((col & 1) << 1) | ((row & 1) << 0)) * 2 + // let h_off = ((self.pixel - 1) / 16) % 2; + // let v_off = (self.scanline / 16) % 2; + // let off = v_off * 4 + h_off * 2; + let palette = (attr >> (((col & 2) << 0) | ((row & 2) << 1))) & 0x3; + for y_off in 0..8 { + let low = mem.peek_ppu(name + y_off).unwrap(); + let high = mem.peek_ppu(name + y_off + 8).unwrap(); + for bit in 0..8 { + frame.fill_rectangle( + Point::new( + x as f32 * 8. + 8. - bit as f32, + y as f32 * 8. + y_off as f32, + ), + Size::new(1., 1.), + match (low & (1 << bit) != 0, high & (1 << bit) != 0) { + (false, false) => self.palette.color(0), + (true, false) => self.palette.color(1 + 4 * palette), + (false, true) => self.palette.color(2 + 4 * palette), + (true, true) => self.palette.color(3 + 4 * palette), + // (false, false) => Color { r: 0, g: 0, b: 0 }, + // (true, false) => Color { + // r: 64, + // g: 64, + // b: 64, + // }, + // (false, true) => Color { + // r: 128, + // g: 128, + // b: 128, + // }, + // (true, true) => Color { + // r: 255, + // g: 255, + // b: 255, + // }, + }, + ); + } + } + // for + // let pat = mem.peek(); + } + } + } + pub fn name_cursor_info(&self, mem: &Mapped, cursor: Point) -> Option { + let x = (cursor.x / 8.) as usize; + let y = (cursor.y / 8.) as usize; + if x < 64 && y < 60 { + let row = y % 30; + let col = x % 32; + let off = 0x2000 + 0x400 * (y / 30 * 2 + x / 32); + let name = mem.peek_ppu((off + col + row * 32) as u16).unwrap() as usize; + let attr = mem + .peek_ppu((col / 4 + row / 4 * 8 + 0x3C0 + off) as u16) + .unwrap(); + Some(format!( + "Row, Column: {}, {} +X, Y: {}, {} +Tilemap address: ${:04X} + +Tile Index: ${:02X} +Tile Address (PPU): ${:04X} +Tile Address (CHR): ${:04X} + +Palette Index {} +Palette Address ${:04X} + +Attribute Address ${:04X} +Attribute data: ${:02X} +", + row, + col, + col * 8, + row * 8, + off + col + row * 32, + name, + name * 16 + + if self.background.second_pattern { + 0x1000 + } else { + 0 + }, + name * 16 + + if self.background.second_pattern { + 0x1000 + } else { + 0 + }, + (attr >> (((col & 1) << 1) | ((row & 1) << 2))) & 0x3, + ((attr >> (((col & 1) << 1) | ((row & 1) << 2))) & 0x3) as usize * 4 + 0x3F00, + col / 4 + row / 4 * 8 + 0x3C0 + off, + attr, + )) + } else { + None + } + } + + pub fn render_pattern_tables(&self, mem: &Mapped, frame: &mut Frame) { + for y in 0..16 { + for x in 0..16 { + let name = (y * 16 + x) * 16; + for y_off in 0..8 { + let low = mem.peek_ppu(name + y_off).unwrap(); + let high = mem.peek_ppu(name + y_off + 8).unwrap(); + for bit in 0..8 { + frame.fill_rectangle( + Point::new( + x as f32 * 8. + 8. - bit as f32, + y as f32 * 8. + y_off as f32, + ), + Size::new(1., 1.), + match (low & (1 << bit) != 0, high & (1 << bit) != 0) { + (false, false) => Color { r: 0, g: 0, b: 0 }, + (true, false) => Color { + r: 64, + g: 64, + b: 64, + }, + (false, true) => Color { + r: 128, + g: 128, + b: 128, + }, + (true, true) => Color { + r: 255, + g: 255, + b: 255, + }, + }, + ); + } + } + } + } + + for y in 0..16 { + for x in 0..16 { + let name = (y * 16 + x) * 16; + for y_off in 0..8 { + let low = mem.peek_ppu(name + y_off + 0x1000).unwrap(); + let high = mem.peek_ppu(name + y_off + 8 + 0x1000).unwrap(); + for bit in 0..8 { + frame.fill_rectangle( + Point::new( + x as f32 * 8. + 8. - bit as f32, + y as f32 * 8. + y_off as f32 + 130., + ), + Size::new(1., 1.), + match (low & (1 << bit) != 0, high & (1 << bit) != 0) { + (false, false) => Color { r: 0, g: 0, b: 0 }, + (true, false) => Color { + r: 64, + g: 64, + b: 64, + }, + (false, true) => Color { + r: 128, + g: 128, + b: 128, + }, + (true, true) => Color { + r: 255, + g: 255, + b: 255, + }, + }, + ); + } + } + // for + // let pat = mem.peek(); + } + } + } + pub fn pattern_cursor_info(&self, cursor: Point) -> Option { + let x = (cursor.x / 8.) as usize; + let y = (cursor.y / 8.) as usize; + if x < 16 && y < 32 { + Some(format!( + "Tile address (PPU): {:04X}\nTile address (CHR): {:04X}\nIndex: {:02X}", + (y * 16 + x) * 16, + (y * 16 + x) * 16, + ((y % 16) * 16 + x), + )) + } else { + None + } + } + + pub fn render_palette(&self, frame: &mut Frame) { + for y in 0..8 { + for x in 0..4 { + frame.fill_rectangle( + Point::new(x as f32 * 10., y as f32 * 10.), + Size::new(10., 10.), + self.palette.colors[(self.palette.ram[x + y * 4] & 0x3F) as usize], + ); + } + } + } + pub fn palette_cursor_info(&self, cursor: Point) -> Option { + let x = (cursor.x / 10.) as usize; + let y = (cursor.y / 10.) as usize; + if x < 4 && y < 8 { + Some(format!( + "Index: {:02X}\nValue: {:02X}\nColor code: {}", + x + y * 4, + self.palette.ram[x + y * 4] & 0x3F, + self.palette.colors[(self.palette.ram[x + y * 4] & 0x3F) as usize], + )) + } else { + None + } + } + } +} diff --git a/src/test_roms/apu_pulse_1.s b/src/test_roms/apu_pulse_1.s index b0c6587..c5b6a0c 100644 --- a/src/test_roms/apu_pulse_1.s +++ b/src/test_roms/apu_pulse_1.s @@ -2,8 +2,8 @@ .include "audio_inp.s" zp_res TIMER_LOW -; zp_res TIMER_LOW -; zp_res TIMER_LOW +zp_res SWEEP +zp_res DLCV ; zp_res TIMER_LOW reset: @@ -14,10 +14,12 @@ reset: lda #$01 sta SNDCHN - lda #$AF ; Duty 2, LC halted, evelope enabled, volume = F + lda #$BF ; Duty 2, LC halted, evelope enabled, volume = F sta PULSE_CH1_DLCV + sta DLCV lda #$7F ; sta PULSE_CH1_SWEEP + sta SWEEP lda #$6F sta PULSE_CH1_TLOW sta TIMER_LOW @@ -43,21 +45,32 @@ reset: write_char_x ':' load_ppu_addr $2061 - ; write_char_x 't' - ; write_char_x 'i' - ; write_char_x 'm' - ; write_char_x 'e' - ; write_char_x 'r' - ; write_char_x ' ' - ; write_char_x 'h' - ; write_char_x 'o' - ; write_char_x 'w' - ; write_char_x ':' + write_char_x 's' + write_char_x 'w' + write_char_x 'e' + write_char_x 'e' + write_char_x 'p' + write_char_x ':' + + load_ppu_addr $2081 + write_char_x 'd' + write_char_x 'l' + write_char_x 'c' + write_char_x 'v' + write_char_x ':' load_ppu_addr $204C lda TIMER_LOW jsr write_hex_a + load_ppu_addr $206C + lda SWEEP + jsr write_hex_a + + load_ppu_addr $208C + lda DLCV + jsr write_hex_a + jsr enable_rendering loop: jmp loop @@ -67,28 +80,83 @@ loop: audio_nmi: EOR JOY_PREV STA JOY_PREV + lda JOYTEMP and #JOY_UP_MASK and JOY_PREV - beq next_1 + beq down load_ppu_addr $204C lda #$01 adc TIMER_LOW sta TIMER_LOW sta PULSE_CH1_TLOW jsr write_hex_a -next_1: + +down: lda JOYTEMP and #JOY_DOWN_MASK and JOY_PREV - beq next_2 + beq left load_ppu_addr $204C lda #$FF adc TIMER_LOW sta TIMER_LOW sta PULSE_CH1_TLOW jsr write_hex_a -next_2: + +left: + lda JOYTEMP + and #JOY_LEFT_MASK + and JOY_PREV + beq right + load_ppu_addr $206C + lda #$FF + adc SWEEP + sta SWEEP + sta PULSE_CH1_SWEEP + jsr write_hex_a + +right: + lda JOYTEMP + and #JOY_RIGHT_MASK + and JOY_PREV + beq joy_a + load_ppu_addr $206C + lda #$01 + adc SWEEP + sta SWEEP + sta PULSE_CH1_SWEEP + jsr write_hex_a + +joy_a: + lda JOYTEMP + and #JOY_A_MASK + and JOY_PREV + beq joy_b + load_ppu_addr $208C + lda DLCV + eor #$10 + sta DLCV + sta PULSE_CH1_DLCV + jsr write_hex_a + ; sta PULSE_CH1_DLCV + lda #$F0 + sta PULSE_CH1_LCTH + +joy_b: + lda JOYTEMP + and #JOY_B_MASK + and JOY_PREV + beq done + load_ppu_addr $204C + lda #$00 + ; adc TIMER_LOW + ; sta TIMER_LOW + sta PULSE_CH1_TLOW + ; jsr write_hex_a +done: + + lda JOYTEMP STA JOY_PREV rts diff --git a/wasm.fish b/wasm.fish new file mode 100755 index 0000000..8a006ec --- /dev/null +++ b/wasm.fish @@ -0,0 +1,6 @@ +#!/usr/bin/fish + +# RUSTFLAGS=--cfg=web_sys_unstable_apis +cargo build --target wasm32-unknown-unknown --bin wasm --features web --release || exit +wasm-bindgen target/wasm32-unknown-unknown/release/wasm.wasm --out-dir wasm --web || exit +simple-http-server wasm || exit diff --git a/wasm/wasm.d.ts b/wasm/wasm.d.ts new file mode 100644 index 0000000..3afc473 --- /dev/null +++ b/wasm/wasm.d.ts @@ -0,0 +1,41 @@ +/* tslint:disable */ +/* eslint-disable */ + +export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; + +export interface InitOutput { + readonly memory: WebAssembly.Memory; + readonly main: (a: number, b: number) => number; + readonly wasm_bindgen__convert__closures_____invoke__h30acef6f6c0e425e: (a: number, b: number, c: any) => void; + readonly wasm_bindgen__closure__destroy__h88746cad1b24036a: (a: number, b: number) => void; + readonly wasm_bindgen__convert__closures_____invoke__hbefc371369f44e63: (a: number, b: number, c: any) => void; + readonly __wbindgen_malloc: (a: number, b: number) => number; + readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number; + readonly __wbindgen_exn_store: (a: number) => void; + readonly __externref_table_alloc: () => number; + readonly __wbindgen_externrefs: WebAssembly.Table; + readonly __wbindgen_free: (a: number, b: number, c: number) => void; + readonly __wbindgen_start: () => void; +} + +export type SyncInitInput = BufferSource | WebAssembly.Module; + +/** +* Instantiates the given `module`, which can either be bytes or +* a precompiled `WebAssembly.Module`. +* +* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated. +* +* @returns {InitOutput} +*/ +export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput; + +/** +* If `module_or_path` is {RequestInfo} or {URL}, makes a request and +* for everything else, calls `WebAssembly.instantiate` directly. +* +* @param {{ module_or_path: InitInput | Promise }} module_or_path - Passing `InitInput` directly is deprecated. +* +* @returns {Promise} +*/ +export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise } | InitInput | Promise): Promise; diff --git a/wasm/wasm.html b/wasm/wasm.html new file mode 100644 index 0000000..c19f55b --- /dev/null +++ b/wasm/wasm.html @@ -0,0 +1,47 @@ + + + + + + Wasm test + + + +

NES Emulator

+
+ +
+

Controls:

+

D-Pad: Arrow keys

+

A: A key

+

B: S key

+

Start: Q key

+

Select: W key

+ +
+
+

Load new ROM:

+ + +
+
+ + + diff --git a/wasm/wasm.js b/wasm/wasm.js new file mode 100644 index 0000000..38678dc --- /dev/null +++ b/wasm/wasm.js @@ -0,0 +1,649 @@ +const lAudioContext = (typeof AudioContext !== 'undefined' ? AudioContext : (typeof webkitAudioContext !== 'undefined' ? webkitAudioContext : undefined)); +let wasm; + +function addToExternrefTable0(obj) { + const idx = wasm.__externref_table_alloc(); + wasm.__wbindgen_externrefs.set(idx, obj); + return idx; +} + +const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined') + ? { register: () => {}, unregister: () => {} } + : new FinalizationRegistry(state => state.dtor(state.a, state.b)); + +function debugString(val) { + // primitive types + const type = typeof val; + if (type == 'number' || type == 'boolean' || val == null) { + return `${val}`; + } + if (type == 'string') { + return `"${val}"`; + } + if (type == 'symbol') { + const description = val.description; + if (description == null) { + return 'Symbol'; + } else { + return `Symbol(${description})`; + } + } + if (type == 'function') { + const name = val.name; + if (typeof name == 'string' && name.length > 0) { + return `Function(${name})`; + } else { + return 'Function'; + } + } + // objects + if (Array.isArray(val)) { + const length = val.length; + let debug = '['; + if (length > 0) { + debug += debugString(val[0]); + } + for(let i = 1; i < length; i++) { + debug += ', ' + debugString(val[i]); + } + debug += ']'; + return debug; + } + // Test for built-in + const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); + let className; + if (builtInMatches && builtInMatches.length > 1) { + className = builtInMatches[1]; + } else { + // Failed to match the standard '[object ClassName]' + return toString.call(val); + } + if (className == 'Object') { + // we're a user defined class or Object + // JSON.stringify avoids problems with cycles, and is generally much + // easier than looping through ownProperties of `val`. + try { + return 'Object(' + JSON.stringify(val) + ')'; + } catch (_) { + return 'Object'; + } + } + // errors + if (val instanceof Error) { + return `${val.name}: ${val.message}\n${val.stack}`; + } + // TODO we could test for more things here, like `Set`s and `Map`s. + return className; +} + +function getArrayF32FromWasm0(ptr, len) { + ptr = ptr >>> 0; + return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len); +} + +function getArrayU8FromWasm0(ptr, len) { + ptr = ptr >>> 0; + return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len); +} + +function getClampedArrayU8FromWasm0(ptr, len) { + ptr = ptr >>> 0; + return getUint8ClampedArrayMemory0().subarray(ptr / 1, ptr / 1 + len); +} + +let cachedDataViewMemory0 = null; +function getDataViewMemory0() { + if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { + cachedDataViewMemory0 = new DataView(wasm.memory.buffer); + } + return cachedDataViewMemory0; +} + +let cachedFloat32ArrayMemory0 = null; +function getFloat32ArrayMemory0() { + if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) { + cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer); + } + return cachedFloat32ArrayMemory0; +} + +function getStringFromWasm0(ptr, len) { + ptr = ptr >>> 0; + return decodeText(ptr, len); +} + +let cachedUint8ArrayMemory0 = null; +function getUint8ArrayMemory0() { + if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { + cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); + } + return cachedUint8ArrayMemory0; +} + +let cachedUint8ClampedArrayMemory0 = null; +function getUint8ClampedArrayMemory0() { + if (cachedUint8ClampedArrayMemory0 === null || cachedUint8ClampedArrayMemory0.byteLength === 0) { + cachedUint8ClampedArrayMemory0 = new Uint8ClampedArray(wasm.memory.buffer); + } + return cachedUint8ClampedArrayMemory0; +} + +function handleError(f, args) { + try { + return f.apply(this, args); + } catch (e) { + const idx = addToExternrefTable0(e); + wasm.__wbindgen_exn_store(idx); + } +} + +function isLikeNone(x) { + return x === undefined || x === null; +} + +function makeClosure(arg0, arg1, dtor, f) { + const state = { a: arg0, b: arg1, cnt: 1, dtor }; + const real = (...args) => { + + // First up with a closure we increment the internal reference + // count. This ensures that the Rust closure environment won't + // be deallocated while we're invoking it. + state.cnt++; + try { + return f(state.a, state.b, ...args); + } finally { + real._wbg_cb_unref(); + } + }; + real._wbg_cb_unref = () => { + if (--state.cnt === 0) { + state.dtor(state.a, state.b); + state.a = 0; + CLOSURE_DTORS.unregister(state); + } + }; + CLOSURE_DTORS.register(real, state, state); + return real; +} + +function makeMutClosure(arg0, arg1, dtor, f) { + const state = { a: arg0, b: arg1, cnt: 1, dtor }; + const real = (...args) => { + + // First up with a closure we increment the internal reference + // count. This ensures that the Rust closure environment won't + // be deallocated while we're invoking it. + state.cnt++; + const a = state.a; + state.a = 0; + try { + return f(a, state.b, ...args); + } finally { + state.a = a; + real._wbg_cb_unref(); + } + }; + real._wbg_cb_unref = () => { + if (--state.cnt === 0) { + state.dtor(state.a, state.b); + state.a = 0; + CLOSURE_DTORS.unregister(state); + } + }; + CLOSURE_DTORS.register(real, state, state); + return real; +} + +function passStringToWasm0(arg, malloc, realloc) { + if (realloc === undefined) { + const buf = cachedTextEncoder.encode(arg); + const ptr = malloc(buf.length, 1) >>> 0; + getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); + WASM_VECTOR_LEN = buf.length; + return ptr; + } + + let len = arg.length; + let ptr = malloc(len, 1) >>> 0; + + const mem = getUint8ArrayMemory0(); + + let offset = 0; + + for (; offset < len; offset++) { + const code = arg.charCodeAt(offset); + if (code > 0x7F) break; + mem[ptr + offset] = code; + } + if (offset !== len) { + if (offset !== 0) { + arg = arg.slice(offset); + } + ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; + const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); + const ret = cachedTextEncoder.encodeInto(arg, view); + + offset += ret.written; + ptr = realloc(ptr, len, offset, 1) >>> 0; + } + + WASM_VECTOR_LEN = offset; + return ptr; +} + +let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); +cachedTextDecoder.decode(); +const MAX_SAFARI_DECODE_BYTES = 2146435072; +let numBytesDecoded = 0; +function decodeText(ptr, len) { + numBytesDecoded += len; + if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { + cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); + cachedTextDecoder.decode(); + numBytesDecoded = len; + } + return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); +} + +const cachedTextEncoder = new TextEncoder(); + +if (!('encodeInto' in cachedTextEncoder)) { + cachedTextEncoder.encodeInto = function (arg, view) { + const buf = cachedTextEncoder.encode(arg); + view.set(buf); + return { + read: arg.length, + written: buf.length + }; + } +} + +let WASM_VECTOR_LEN = 0; + +function wasm_bindgen__convert__closures_____invoke__h30acef6f6c0e425e(arg0, arg1, arg2) { + wasm.wasm_bindgen__convert__closures_____invoke__h30acef6f6c0e425e(arg0, arg1, arg2); +} + +function wasm_bindgen__convert__closures_____invoke__hbefc371369f44e63(arg0, arg1, arg2) { + wasm.wasm_bindgen__convert__closures_____invoke__hbefc371369f44e63(arg0, arg1, arg2); +} + +const __wbindgen_enum_AudioContextState = ["suspended", "running", "closed"]; + +const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']); + +async function __wbg_load(module, imports) { + if (typeof Response === 'function' && module instanceof Response) { + if (typeof WebAssembly.instantiateStreaming === 'function') { + try { + return await WebAssembly.instantiateStreaming(module, imports); + } catch (e) { + const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type); + + if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') { + console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e); + + } else { + throw e; + } + } + } + + const bytes = await module.arrayBuffer(); + return await WebAssembly.instantiate(bytes, imports); + } else { + const instance = await WebAssembly.instantiate(module, imports); + + if (instance instanceof WebAssembly.Instance) { + return { instance, module }; + } else { + return instance; + } + } +} + +function __wbg_get_imports() { + const imports = {}; + imports.wbg = {}; + imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) { + const ret = debugString(arg1); + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) { + const ret = arg0 === undefined; + return ret; + }; + imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) { + throw new Error(getStringFromWasm0(arg0, arg1)); + }; + imports.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) { + arg0._wbg_cb_unref(); + }; + imports.wbg.__wbg_addEventListener_6a82629b3d430a48 = function() { return handleError(function (arg0, arg1, arg2, arg3) { + arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3); + }, arguments) }; + imports.wbg.__wbg_bytes_2820db0ab474c07d = function(arg0) { + const ret = arg0.bytes(); + return ret; + }; + imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) { + const ret = arg0.call(arg1); + return ret; + }, arguments) }; + imports.wbg.__wbg_connect_9a58a232bfff28c8 = function() { return handleError(function (arg0, arg1, arg2) { + const ret = arg0.connect(arg1, arg2 >>> 0); + return ret; + }, arguments) }; + imports.wbg.__wbg_connect_f28a2db518e02462 = function() { return handleError(function (arg0, arg1) { + const ret = arg0.connect(arg1); + return ret; + }, arguments) }; + imports.wbg.__wbg_copyToChannel_30d90303302ec449 = function() { return handleError(function (arg0, arg1, arg2, arg3) { + arg0.copyToChannel(getArrayF32FromWasm0(arg1, arg2), arg3); + }, arguments) }; + imports.wbg.__wbg_createBufferSource_156317138619c7b0 = function() { return handleError(function (arg0) { + const ret = arg0.createBufferSource(); + return ret; + }, arguments) }; + imports.wbg.__wbg_createDelay_6439a64d02500fa1 = function() { return handleError(function (arg0) { + const ret = arg0.createDelay(); + return ret; + }, arguments) }; + imports.wbg.__wbg_createGain_d5704df14f1e271f = function() { return handleError(function (arg0) { + const ret = arg0.createGain(); + return ret; + }, arguments) }; + imports.wbg.__wbg_createImageBitmap_50df7cebf5a3d827 = function() { return handleError(function (arg0, arg1) { + const ret = arg0.createImageBitmap(arg1); + return ret; + }, arguments) }; + imports.wbg.__wbg_currentTime_7d6df02e29507923 = function(arg0) { + const ret = arg0.currentTime; + return ret; + }; + imports.wbg.__wbg_debug_9d0c87ddda3dc485 = function(arg0) { + console.debug(arg0); + }; + imports.wbg.__wbg_delayTime_56315e7f0ef53379 = function(arg0) { + const ret = arg0.delayTime; + return ret; + }; + imports.wbg.__wbg_destination_1dd37feba0c0cab6 = function(arg0) { + const ret = arg0.destination; + return ret; + }; + imports.wbg.__wbg_document_5b745e82ba551ca5 = function(arg0) { + const ret = arg0.document; + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_drawImage_44577ef8eab8c151 = function() { return handleError(function (arg0, arg1, arg2, arg3) { + arg0.drawImage(arg1, arg2, arg3); + }, arguments) }; + imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) { + let deferred0_0; + let deferred0_1; + try { + deferred0_0 = arg0; + deferred0_1 = arg1; + console.error(getStringFromWasm0(arg0, arg1)); + } finally { + wasm.__wbindgen_free(deferred0_0, deferred0_1, 1); + } + }; + imports.wbg.__wbg_error_7bc7d576a6aaf855 = function(arg0) { + console.error(arg0); + }; + imports.wbg.__wbg_files_aa1f009258eadae6 = function(arg0) { + const ret = arg0.files; + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_gain_435505e65fb96146 = function(arg0) { + const ret = arg0.gain; + return ret; + }; + imports.wbg.__wbg_getContext_01f42b234e833f0a = function() { return handleError(function (arg0, arg1, arg2) { + const ret = arg0.getContext(getStringFromWasm0(arg1, arg2)); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }, arguments) }; + imports.wbg.__wbg_getElementById_e05488d2143c2b21 = function(arg0, arg1, arg2) { + const ret = arg0.getElementById(getStringFromWasm0(arg1, arg2)); + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_get_89bca58298277b24 = function(arg0, arg1) { + const ret = arg0[arg1 >>> 0]; + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_info_ce6bcc489c22f6f0 = function(arg0) { + console.info(arg0); + }; + imports.wbg.__wbg_instanceof_Window_b5cf7783caa68180 = function(arg0) { + let result; + try { + result = arg0 instanceof Window; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_key_505d33c50799526a = function(arg0, arg1) { + const ret = arg1.key; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) { + const ret = arg0.length; + return ret; + }; + imports.wbg.__wbg_log_1d990106d99dacb7 = function(arg0) { + console.log(arg0); + }; + imports.wbg.__wbg_new_1ba21ce319a06297 = function() { + const ret = new Object(); + return ret; + }; + imports.wbg.__wbg_new_8a6f238a6ece86ea = function() { + const ret = new Error(); + return ret; + }; + imports.wbg.__wbg_new_a2ec8094aa0713cb = function() { return handleError(function (arg0) { + const ret = new AudioBuffer(arg0); + return ret; + }, arguments) }; + imports.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) { + const ret = new Function(getStringFromWasm0(arg0, arg1)); + return ret; + }; + imports.wbg.__wbg_new_with_context_options_ef5b87cd25cac8d1 = function() { return handleError(function (arg0) { + const ret = new lAudioContext(arg0); + return ret; + }, arguments) }; + imports.wbg.__wbg_new_with_u8_clamped_array_e14490b754099e0e = function() { return handleError(function (arg0, arg1, arg2) { + const ret = new ImageData(getClampedArrayU8FromWasm0(arg0, arg1), arg2 >>> 0); + return ret; + }, arguments) }; + imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) { + Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2); + }; + imports.wbg.__wbg_requestAnimationFrame_994dc4ebde22b8d9 = function() { return handleError(function (arg0, arg1) { + const ret = arg0.requestAnimationFrame(arg1); + return ret; + }, arguments) }; + imports.wbg.__wbg_reset_6985caa8186d4f54 = function(arg0) { + arg0.reset(); + }; + imports.wbg.__wbg_resume_7d320c513be492d2 = function() { return handleError(function (arg0) { + const ret = arg0.resume(); + return ret; + }, arguments) }; + imports.wbg.__wbg_set_accept_4af7309453c16421 = function(arg0, arg1, arg2) { + arg0.accept = getStringFromWasm0(arg1, arg2); + }; + imports.wbg.__wbg_set_buffer_25c70ce663d1667c = function(arg0, arg1) { + arg0.buffer = arg1; + }; + imports.wbg.__wbg_set_channelCount_4b7d6cec989c8ae3 = function(arg0, arg1) { + arg0.channelCount = arg1 >>> 0; + }; + imports.wbg.__wbg_set_innerText_b0abb40240106cb9 = function(arg0, arg1, arg2) { + arg0.innerText = getStringFromWasm0(arg1, arg2); + }; + imports.wbg.__wbg_set_length_957d490e6b543adf = function(arg0, arg1) { + arg0.length = arg1 >>> 0; + }; + imports.wbg.__wbg_set_loop_8096808d7e93a3af = function(arg0, arg1) { + arg0.loop = arg1 !== 0; + }; + imports.wbg.__wbg_set_number_of_channels_f0c703fb96f63365 = function(arg0, arg1) { + arg0.numberOfChannels = arg1 >>> 0; + }; + imports.wbg.__wbg_set_onkeydown_d2621c474b636979 = function(arg0, arg1) { + arg0.onkeydown = arg1; + }; + imports.wbg.__wbg_set_onkeyup_913b36756e057c1d = function(arg0, arg1) { + arg0.onkeyup = arg1; + }; + imports.wbg.__wbg_set_sample_rate_9ba31b5c895c7108 = function(arg0, arg1) { + arg0.sampleRate = arg1; + }; + imports.wbg.__wbg_set_sample_rate_fc3bf6128936f9e5 = function(arg0, arg1) { + arg0.sampleRate = arg1; + }; + imports.wbg.__wbg_set_value_9b29412dd286d5d4 = function(arg0, arg1) { + arg0.value = arg1; + }; + imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) { + const ret = arg1.stack; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbg_start_865ed2d65a6d353e = function() { return handleError(function (arg0, arg1) { + arg0.start(arg1); + }, arguments) }; + imports.wbg.__wbg_state_c28a610878aaf489 = function(arg0) { + const ret = arg0.state; + return (__wbindgen_enum_AudioContextState.indexOf(ret) + 1 || 4) - 1; + }; + imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() { + const ret = typeof global === 'undefined' ? null : global; + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() { + const ret = typeof globalThis === 'undefined' ? null : globalThis; + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() { + const ret = typeof self === 'undefined' ? null : self; + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() { + const ret = typeof window === 'undefined' ? null : window; + return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); + }; + imports.wbg.__wbg_suspend_e4145c9878ac544f = function() { return handleError(function (arg0) { + const ret = arg0.suspend(); + return ret; + }, arguments) }; + imports.wbg.__wbg_then_4f95312d68691235 = function(arg0, arg1) { + const ret = arg0.then(arg1); + return ret; + }; + imports.wbg.__wbg_warn_6e567d0d926ff881 = function(arg0) { + console.warn(arg0); + }; + imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) { + // Cast intrinsic for `Ref(String) -> Externref`. + const ret = getStringFromWasm0(arg0, arg1); + return ret; + }; + imports.wbg.__wbindgen_cast_8e402a763b70599f = function(arg0, arg1) { + // Cast intrinsic for `Closure(Closure { dtor_idx: 25, function: Function { arguments: [Externref], shim_idx: 28, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`. + const ret = makeClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h88746cad1b24036a, wasm_bindgen__convert__closures_____invoke__hbefc371369f44e63); + return ret; + }; + imports.wbg.__wbindgen_cast_b3587965ddad1edc = function(arg0, arg1) { + // Cast intrinsic for `Closure(Closure { dtor_idx: 25, function: Function { arguments: [Externref], shim_idx: 26, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. + const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h88746cad1b24036a, wasm_bindgen__convert__closures_____invoke__h30acef6f6c0e425e); + return ret; + }; + imports.wbg.__wbindgen_init_externref_table = function() { + const table = wasm.__wbindgen_externrefs; + const offset = table.grow(4); + table.set(0, undefined); + table.set(offset + 0, undefined); + table.set(offset + 1, null); + table.set(offset + 2, true); + table.set(offset + 3, false); + }; + + return imports; +} + +function __wbg_finalize_init(instance, module) { + wasm = instance.exports; + __wbg_init.__wbindgen_wasm_module = module; + cachedDataViewMemory0 = null; + cachedFloat32ArrayMemory0 = null; + cachedUint8ArrayMemory0 = null; + cachedUint8ClampedArrayMemory0 = null; + + + wasm.__wbindgen_start(); + return wasm; +} + +function initSync(module) { + if (wasm !== undefined) return wasm; + + + if (typeof module !== 'undefined') { + if (Object.getPrototypeOf(module) === Object.prototype) { + ({module} = module) + } else { + console.warn('using deprecated parameters for `initSync()`; pass a single object instead') + } + } + + const imports = __wbg_get_imports(); + if (!(module instanceof WebAssembly.Module)) { + module = new WebAssembly.Module(module); + } + const instance = new WebAssembly.Instance(module, imports); + return __wbg_finalize_init(instance, module); +} + +async function __wbg_init(module_or_path) { + if (wasm !== undefined) return wasm; + + + if (typeof module_or_path !== 'undefined') { + if (Object.getPrototypeOf(module_or_path) === Object.prototype) { + ({module_or_path} = module_or_path) + } else { + console.warn('using deprecated parameters for the initialization function; pass a single object instead') + } + } + + if (typeof module_or_path === 'undefined') { + module_or_path = new URL('wasm_bg.wasm', import.meta.url); + } + const imports = __wbg_get_imports(); + + if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) { + module_or_path = fetch(module_or_path); + } + + const { instance, module } = await __wbg_load(await module_or_path, imports); + + return __wbg_finalize_init(instance, module); +} + +export { initSync }; +export default __wbg_init; diff --git a/wasm/wasm_bg.wasm b/wasm/wasm_bg.wasm new file mode 100644 index 0000000..4375d8f Binary files /dev/null and b/wasm/wasm_bg.wasm differ diff --git a/wasm/wasm_bg.wasm.d.ts b/wasm/wasm_bg.wasm.d.ts new file mode 100644 index 0000000..6da246c --- /dev/null +++ b/wasm/wasm_bg.wasm.d.ts @@ -0,0 +1,14 @@ +/* tslint:disable */ +/* eslint-disable */ +export const memory: WebAssembly.Memory; +export const main: (a: number, b: number) => number; +export const wasm_bindgen__convert__closures_____invoke__h30acef6f6c0e425e: (a: number, b: number, c: any) => void; +export const wasm_bindgen__closure__destroy__h88746cad1b24036a: (a: number, b: number) => void; +export const wasm_bindgen__convert__closures_____invoke__hbefc371369f44e63: (a: number, b: number, c: any) => void; +export const __wbindgen_malloc: (a: number, b: number) => number; +export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number; +export const __wbindgen_exn_store: (a: number) => void; +export const __externref_table_alloc: () => number; +export const __wbindgen_externrefs: WebAssembly.Table; +export const __wbindgen_free: (a: number, b: number, c: number) => void; +export const __wbindgen_start: () => void;