From e49bed7db59820b9b8929fb4eba1a429f9b40fbc Mon Sep 17 00:00:00 2001 From: Kai Schmidt Date: Fri, 16 Aug 2024 14:37:02 -0700 Subject: [PATCH] use uiua-nokhwa and prepare 0.12.1 release --- Cargo.lock | 311 ++++++++++++++++------------------------------ Cargo.toml | 6 +- changelog.md | 5 + src/sys_native.rs | 2 +- 4 files changed, 114 insertions(+), 210 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1f37faec8..1af13b123 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -71,15 +71,6 @@ dependencies = [ "rgb", ] -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - [[package]] name = "anstream" version = "0.6.13" @@ -211,17 +202,6 @@ dependencies = [ "syn 2.0.55", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "auto_impl" version = "1.2.0" @@ -277,24 +257,24 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.56.0" +version = "0.65.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da379dbebc0b76ef63ca68d8fc6e71c0f13e59432e0987e508c1820e6ab5239" +checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" dependencies = [ "bitflags 1.3.2", - "cexpr 0.4.0", + "cexpr", "clang-sys", - "clap 2.34.0", - "env_logger", "lazy_static", "lazycell", "log", "peeking_take_while", + "prettyplease", "proc-macro2", "quote", "regex", "rustc-hash", - "shlex 0.1.1", + "shlex", + "syn 2.0.55", "which", ] @@ -305,7 +285,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" dependencies = [ "bitflags 2.5.0", - "cexpr 0.6.0", + "cexpr", "clang-sys", "itertools", "lazy_static", @@ -314,7 +294,7 @@ dependencies = [ "quote", "regex", "rustc-hash", - "shlex 1.3.0", + "shlex", "syn 2.0.55", ] @@ -422,12 +402,13 @@ checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" [[package]] name = "cc" -version = "1.0.90" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -436,22 +417,13 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" -[[package]] -name = "cexpr" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27" -dependencies = [ - "nom 5.1.3", -] - [[package]] name = "cexpr" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ - "nom 7.1.3", + "nom", ] [[package]] @@ -522,21 +494,6 @@ dependencies = [ "libloading", ] -[[package]] -name = "clap" -version = "2.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" -dependencies = [ - "ansi_term", - "atty", - "bitflags 1.3.2", - "strsim 0.8.0", - "textwrap", - "unicode-width", - "vec_map", -] - [[package]] name = "clap" version = "4.5.4" @@ -679,7 +636,7 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0436149c9f6a1935b13306206c739b1ba84fa81f551b5eb87fc2ca7a13700af" dependencies = [ - "clap 4.5.4", + "clap", "derive_builder", "entities", "memchr", @@ -701,7 +658,7 @@ checksum = "7328b20597b53c2454f0b1919720c25c7339051c02b72b7e05409e00b14132be" dependencies = [ "convert_case", "lazy_static", - "nom 7.1.3", + "nom", "pathdiff", "serde", "toml", @@ -1232,19 +1189,6 @@ dependencies = [ "syn 2.0.55", ] -[[package]] -name = "env_logger" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - [[package]] name = "equivalent" version = "1.0.1" @@ -1635,15 +1579,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.9" @@ -1715,12 +1650,6 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - [[package]] name = "iana-time-zone" version = "0.1.60" @@ -1888,9 +1817,9 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "jobserver" -version = "0.1.28" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] @@ -2341,9 +2270,9 @@ dependencies = [ [[package]] name = "mozjpeg" -version = "0.9.8" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a807fbca64e7df4847726d172f459fb13e65cbf5e23b01f27408581d58258f" +checksum = "9a3bcd16df874918cb91d9ca985d7fde466bdc3b0983bf83c33395033568e510" dependencies = [ "arrayvec", "libc", @@ -2353,9 +2282,9 @@ dependencies = [ [[package]] name = "mozjpeg-sys" -version = "1.1.1" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74c4fe4006093b2948ccb37bb413b6b9da2d654a9a50419b5861b0f4e8ad4da9" +checksum = "27e31c0171e0b1158c0dfb7386dbdf999f4a9afaa83fd68de39c7929f4d5c16f" dependencies = [ "cc", "dunce", @@ -2377,6 +2306,9 @@ name = "nasm-rs" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe4d98d0065f4b1daf164b3eafb11974c94662e5e2396cf03f32d0bb5c17da51" +dependencies = [ + "rayon", +] [[package]] name = "ndk" @@ -2428,82 +2360,6 @@ dependencies = [ "libc", ] -[[package]] -name = "nokhwa" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc4ae290027ab0d22e1405d304603e41edfaee597a81ce09cf751785b44c32a9" -dependencies = [ - "flume 0.10.14", - "image", - "nokhwa-bindings-linux", - "nokhwa-bindings-macos", - "nokhwa-bindings-windows", - "nokhwa-core", - "paste", - "thiserror", -] - -[[package]] -name = "nokhwa-bindings-linux" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "448db09af68e12168b6311423409f679d2da6e75fb158b2d75de2f5d6dc460ca" -dependencies = [ - "nokhwa-core", - "v4l", - "v4l2-sys-mit", -] - -[[package]] -name = "nokhwa-bindings-macos" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cb2044194c8cc0286a0bfae023caeb434c32900ffe3f3d08565362306437be8" -dependencies = [ - "block", - "cocoa-foundation", - "core-media-sys", - "core-video-sys", - "flume 0.10.14", - "nokhwa-core", - "objc", - "once_cell", -] - -[[package]] -name = "nokhwa-bindings-windows" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9b9bae36d0ce413568cefb94c43748e80f9ae97aa0a9e2d8e18f0275a909746" -dependencies = [ - "nokhwa-core", - "once_cell", - "windows 0.43.0", -] - -[[package]] -name = "nokhwa-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb9b0e58413cb1b6d041d802be0e921368f3c72525b7ea720089c8aa140d6d49" -dependencies = [ - "bytes", - "image", - "mozjpeg", - "thiserror", -] - -[[package]] -name = "nom" -version = "5.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08959a387a676302eebf4ddbcbc611da04285579f76f88ee0506c63b1a61dd4b" -dependencies = [ - "memchr", - "version_check", -] - [[package]] name = "nom" version = "7.1.3" @@ -2583,7 +2439,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", ] @@ -3526,12 +3382,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" -[[package]] -name = "shlex" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" - [[package]] name = "shlex" version = "1.3.0" @@ -3659,12 +3509,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe895eb47f22e2ddd4dabc02bce419d2e643c8e3b585c78158b349195bc24d82" -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - [[package]] name = "strsim" version = "0.10.0" @@ -3790,15 +3634,6 @@ dependencies = [ "uiua", ] -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - [[package]] name = "thiserror" version = "1.0.58" @@ -4113,13 +3948,13 @@ checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "uiua" -version = "0.12.0" +version = "0.12.1" dependencies = [ "arboard", "bitflags 2.5.0", "bufreaderwriter", "calamine", - "clap 4.5.4", + "clap", "color-backtrace", "color_quant", "colored", @@ -4140,7 +3975,6 @@ dependencies = [ "libffi", "libloading", "lockfree", - "nokhwa", "notify", "num_cpus", "once_cell", @@ -4171,6 +4005,7 @@ dependencies = [ "toml", "tower-lsp", "trash", + "uiua-nokhwa", "unicode-segmentation", "viuer", "wasm-bindgen", @@ -4178,6 +4013,73 @@ dependencies = [ "webpki-roots", ] +[[package]] +name = "uiua-nokhwa" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "108094ce120c3d49f6b9543fccd2e8ec4bea9578e9d2932630f3658784b89cc4" +dependencies = [ + "flume 0.10.14", + "image", + "paste", + "thiserror", + "uiua-nokhwa-bindings-linux", + "uiua-nokhwa-bindings-macos", + "uiua-nokhwa-bindings-windows", + "uiua-nokhwa-core", +] + +[[package]] +name = "uiua-nokhwa-bindings-linux" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57444169896fee6ba6765820102f64c7390de36b005a9bfebbfc6e1c2bc3cfd7" +dependencies = [ + "uiua-nokhwa-core", + "v4l", + "v4l2-sys-mit", +] + +[[package]] +name = "uiua-nokhwa-bindings-macos" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6ad75bd1d695c0efbd21915da70563ed5d988687d6d2fa36b767a0b62c921bf" +dependencies = [ + "block", + "cocoa-foundation", + "core-foundation 0.9.4", + "core-media-sys", + "core-video-sys", + "flume 0.10.14", + "objc", + "once_cell", + "uiua-nokhwa-core", +] + +[[package]] +name = "uiua-nokhwa-bindings-windows" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "840f0e0bd63317afb2809e0ac8a3fc2a7446cf15940dbb6b6525e9b944e3154b" +dependencies = [ + "once_cell", + "uiua-nokhwa-core", + "windows 0.43.0", +] + +[[package]] +name = "uiua-nokhwa-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216cc5abada227b419490dce787c43f8ca34c3f6bec708414a06cdf8ab88f926" +dependencies = [ + "bytes", + "image", + "mozjpeg", + "thiserror", +] + [[package]] name = "unicode-bidi" version = "0.3.15" @@ -4276,9 +4178,9 @@ dependencies = [ [[package]] name = "v4l" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd9946a2fda19c7a729dc72e28b9fd9c653e9b7de954ffe3aecaf51977f88762" +checksum = "d8fbfea44a46799d62c55323f3c55d06df722fbe577851d848d328a1041c3403" dependencies = [ "bitflags 1.3.2", "libc", @@ -4287,19 +4189,13 @@ dependencies = [ [[package]] name = "v4l2-sys-mit" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0c932c06df4af1dfb229f604214f2a87993784596ff33ffdadcba1b5519254e" +checksum = "6779878362b9bacadc7893eac76abe69612e8837ef746573c4a5239daf11990b" dependencies = [ - "bindgen 0.56.0", + "bindgen 0.65.1", ] -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - [[package]] name = "version_check" version = "0.9.4" @@ -4444,11 +4340,14 @@ checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" [[package]] name = "which" -version = "3.1.1" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ - "libc", + "either", + "home", + "once_cell", + "rustix", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 9a0521f25..9faebebd7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ name = "uiua" readme = "readme.md" repository = "https://github.com/uiua-lang/uiua" rust-version = "1.78" -version = "0.12.0" +version = "0.12.1" [dependencies] # Core dependencies @@ -80,11 +80,11 @@ image = {version = "0.24.9", optional = true, default-features = false, features json5 = {version = "0.4.1", optional = true} libffi = {version = "3", optional = true} libloading = {version = "0.8.3", optional = true} -nokhwa = {version = "0.10.4", optional = true, features = ["input-native"]} pathfinding = {version = "4.9.1", optional = true} rustfft = {version = "6.2.0", optional = true} rustls-pemfile = {version = "2.1.2", optional = true} simple_excel_writer = {version = "0.2.0", optional = true} +uiua-nokhwa = {version = "0.10.5", optional = true, features = ["input-native"]} # Web-only dependencies js-sys = {version = "0.3", optional = true} @@ -143,7 +143,7 @@ stand = ["native_sys"] terminal_image = ["viuer", "image"] tls = ["httparse", "rustls", "webpki-roots", "rustls-pemfile"] web = ["wasm-bindgen", "js-sys", "web-sys"] -webcam = ["image", "nokhwa"] +webcam = ["image", "uiua-nokhwa"] xlsx = ["calamine", "simple_excel_writer"] [[bin]] diff --git a/changelog.md b/changelog.md index 2e179d6a7..24d7a6224 100644 --- a/changelog.md +++ b/changelog.md @@ -3,6 +3,11 @@ Uiua is not yet stable. + +## 0.12.1 - 2024-08-16 +### Interpreter +- Use custom version of `nokhwa` crate so that [`&camcap`](https://uiua.org/docs/&camcap) can build + ## 0.12.0 - 2024-08-16 You can find the release announcement [here](https://uiua.org/blog/uiua-0.12.0). ### Language diff --git a/src/sys_native.rs b/src/sys_native.rs index d9ad45929..944756f24 100644 --- a/src/sys_native.rs +++ b/src/sys_native.rs @@ -85,7 +85,7 @@ unsafe impl Sync for WebcamChannel {} #[cfg(feature = "webcam")] impl WebcamChannel { fn new(index: usize) -> Result { - use nokhwa::{ + use uiua_nokhwa::{ pixel_format::RgbFormat, utils::{CameraIndex, RequestedFormat, RequestedFormatType}, Camera,