this repo has no description
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

♻️ Replace channels-console with hotpath (#100)

authored by

Paweł Urbanek and committed by
GitHub
de162571 90c28000

+312 -24
+305 -17
Cargo.lock
··· 98 98 checksum = "170433209e817da6aae2c51aa0dd443009a613425dd041ebfb2492d1c4c11a25" 99 99 100 100 [[package]] 101 + name = "arc-swap" 102 + version = "1.7.1" 103 + source = "registry+https://github.com/rust-lang/crates.io-index" 104 + checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" 105 + 106 + [[package]] 101 107 name = "arrayref" 102 108 version = "0.3.9" 103 109 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 534 540 checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" 535 541 536 542 [[package]] 537 - name = "channels-console" 538 - version = "0.3.3" 539 - source = "registry+https://github.com/rust-lang/crates.io-index" 540 - checksum = "c1d898e1836e012b55b551ef63c81f21ec376ca67be322d9d1747903eaa0eafb" 541 - dependencies = [ 542 - "cfg-if 1.0.4", 543 - "crossbeam-channel", 544 - "eyre", 545 - "futures-util", 546 - "prettytable-rs", 547 - "serde", 548 - "serde_json", 549 - "tiny_http", 550 - ] 551 - 552 - [[package]] 553 543 name = "chrono" 554 544 version = "0.4.42" 555 545 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 569 559 checksum = "6e4de3bc4ea267985becf712dc6d9eed8b04c953b3fcfb339ebc87acd9804901" 570 560 571 561 [[package]] 562 + name = "clap" 563 + version = "4.5.53" 564 + source = "registry+https://github.com/rust-lang/crates.io-index" 565 + checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" 566 + dependencies = [ 567 + "clap_builder", 568 + "clap_derive", 569 + ] 570 + 571 + [[package]] 572 572 name = "clap-sys" 573 573 version = "0.5.0" 574 574 source = "git+https://github.com/micahrj/clap-sys.git?rev=25d7f53fdb6363ad63fbd80049cb7a42a97ac156#25d7f53fdb6363ad63fbd80049cb7a42a97ac156" 575 575 576 576 [[package]] 577 + name = "clap_builder" 578 + version = "4.5.53" 579 + source = "registry+https://github.com/rust-lang/crates.io-index" 580 + checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" 581 + dependencies = [ 582 + "anstream", 583 + "anstyle", 584 + "clap_lex", 585 + "strsim", 586 + ] 587 + 588 + [[package]] 589 + name = "clap_derive" 590 + version = "4.5.49" 591 + source = "registry+https://github.com/rust-lang/crates.io-index" 592 + checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" 593 + dependencies = [ 594 + "heck", 595 + "proc-macro2", 596 + "quote", 597 + "syn 2.0.110", 598 + ] 599 + 600 + [[package]] 601 + name = "clap_lex" 602 + version = "0.7.6" 603 + source = "registry+https://github.com/rust-lang/crates.io-index" 604 + checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" 605 + 606 + [[package]] 577 607 name = "color_quant" 578 608 version = "1.1.0" 579 609 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 586 616 checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" 587 617 588 618 [[package]] 619 + name = "colored" 620 + version = "3.0.0" 621 + source = "registry+https://github.com/rust-lang/crates.io-index" 622 + checksum = "fde0e0ec90c9dfb3b4b1a0891a7dcd0e2bffde2f7efed5fe7c9bb00e5bfb915e" 623 + dependencies = [ 624 + "windows-sys 0.59.0", 625 + ] 626 + 627 + [[package]] 589 628 name = "concurrent-queue" 590 629 version = "2.5.0" 591 630 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 620 659 ] 621 660 622 661 [[package]] 662 + name = "cookie" 663 + version = "0.18.1" 664 + source = "registry+https://github.com/rust-lang/crates.io-index" 665 + checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" 666 + dependencies = [ 667 + "percent-encoding", 668 + "time", 669 + "version_check", 670 + ] 671 + 672 + [[package]] 673 + name = "cookie_store" 674 + version = "0.22.0" 675 + source = "registry+https://github.com/rust-lang/crates.io-index" 676 + checksum = "3fc4bff745c9b4c7fb1e97b25d13153da2bc7796260141df62378998d070207f" 677 + dependencies = [ 678 + "cookie", 679 + "document-features", 680 + "idna", 681 + "indexmap", 682 + "log", 683 + "serde", 684 + "serde_derive", 685 + "serde_json", 686 + "time", 687 + "url", 688 + ] 689 + 690 + [[package]] 623 691 name = "core-foundation" 624 692 version = "0.9.4" 625 693 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 834 902 "itertools 0.12.1", 835 903 "rand 0.9.2", 836 904 "shapemaker", 905 + ] 906 + 907 + [[package]] 908 + name = "document-features" 909 + version = "0.2.12" 910 + source = "registry+https://github.com/rust-lang/crates.io-index" 911 + checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" 912 + dependencies = [ 913 + "litrs", 837 914 ] 838 915 839 916 [[package]] ··· 1224 1301 checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" 1225 1302 1226 1303 [[package]] 1304 + name = "hdrhistogram" 1305 + version = "7.5.4" 1306 + source = "registry+https://github.com/rust-lang/crates.io-index" 1307 + checksum = "765c9198f173dd59ce26ff9f95ef0aafd0a0fe01fb9d72841bc5066a4c06511d" 1308 + dependencies = [ 1309 + "byteorder", 1310 + "num-traits", 1311 + ] 1312 + 1313 + [[package]] 1227 1314 name = "heck" 1228 1315 version = "0.5.0" 1229 1316 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1251 1338 checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 1252 1339 1253 1340 [[package]] 1341 + name = "hotpath" 1342 + version = "0.7.1" 1343 + source = "registry+https://github.com/rust-lang/crates.io-index" 1344 + checksum = "2649393dad24933993d38cc4c299e20d2b68847373b0c57bc99815f4ba35160f" 1345 + dependencies = [ 1346 + "arc-swap", 1347 + "base64", 1348 + "cfg-if 1.0.4", 1349 + "clap", 1350 + "colored", 1351 + "crossbeam-channel", 1352 + "eyre", 1353 + "futures-util", 1354 + "hdrhistogram", 1355 + "hotpath-macros", 1356 + "libc", 1357 + "mach2", 1358 + "prettytable-rs", 1359 + "quanta", 1360 + "regex", 1361 + "serde", 1362 + "serde_json", 1363 + "tiny_http", 1364 + "tokio", 1365 + "ureq", 1366 + ] 1367 + 1368 + [[package]] 1369 + name = "hotpath-macros" 1370 + version = "0.7.1" 1371 + source = "registry+https://github.com/rust-lang/crates.io-index" 1372 + checksum = "efb9a177d0f0b962b3ddfd5862a779851c3f983222d596d15f7f3553c18b7c6e" 1373 + dependencies = [ 1374 + "proc-macro2", 1375 + "quote", 1376 + "syn 2.0.110", 1377 + ] 1378 + 1379 + [[package]] 1254 1380 name = "http" 1255 1381 version = "1.3.1" 1256 1382 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1667 1793 checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" 1668 1794 1669 1795 [[package]] 1796 + name = "litrs" 1797 + version = "1.0.0" 1798 + source = "registry+https://github.com/rust-lang/crates.io-index" 1799 + checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" 1800 + 1801 + [[package]] 1670 1802 name = "lock_api" 1671 1803 version = "0.4.14" 1672 1804 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1691 1823 "objc2", 1692 1824 "objc2-foundation", 1693 1825 "time", 1826 + ] 1827 + 1828 + [[package]] 1829 + name = "mach2" 1830 + version = "0.4.3" 1831 + source = "registry+https://github.com/rust-lang/crates.io-index" 1832 + checksum = "d640282b302c0bb0a2a8e0233ead9035e3bed871f0b7e81fe4a1ec829765db44" 1833 + dependencies = [ 1834 + "libc", 1694 1835 ] 1695 1836 1696 1837 [[package]] ··· 2301 2442 ] 2302 2443 2303 2444 [[package]] 2445 + name = "quanta" 2446 + version = "0.12.6" 2447 + source = "registry+https://github.com/rust-lang/crates.io-index" 2448 + checksum = "f3ab5a9d756f0d97bdc89019bd2e4ea098cf9cde50ee7564dde6b81ccc8f06c7" 2449 + dependencies = [ 2450 + "crossbeam-utils", 2451 + "libc", 2452 + "once_cell", 2453 + "raw-cpuid", 2454 + "wasi 0.11.1+wasi-snapshot-preview1", 2455 + "web-sys", 2456 + "winapi 0.3.9", 2457 + ] 2458 + 2459 + [[package]] 2304 2460 name = "quick-error" 2305 2461 version = "2.0.1" 2306 2462 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2440 2596 ] 2441 2597 2442 2598 [[package]] 2599 + name = "raw-cpuid" 2600 + version = "11.6.0" 2601 + source = "registry+https://github.com/rust-lang/crates.io-index" 2602 + checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" 2603 + dependencies = [ 2604 + "bitflags 2.10.0", 2605 + ] 2606 + 2607 + [[package]] 2443 2608 name = "raw-window-handle" 2444 2609 version = "0.5.2" 2445 2610 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2550 2715 ] 2551 2716 2552 2717 [[package]] 2718 + name = "ring" 2719 + version = "0.17.14" 2720 + source = "registry+https://github.com/rust-lang/crates.io-index" 2721 + checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" 2722 + dependencies = [ 2723 + "cc", 2724 + "cfg-if 1.0.4", 2725 + "getrandom 0.2.16", 2726 + "libc", 2727 + "untrusted", 2728 + "windows-sys 0.52.0", 2729 + ] 2730 + 2731 + [[package]] 2553 2732 name = "roxmltree" 2554 2733 version = "0.20.0" 2555 2734 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2590 2769 ] 2591 2770 2592 2771 [[package]] 2772 + name = "rustls" 2773 + version = "0.23.35" 2774 + source = "registry+https://github.com/rust-lang/crates.io-index" 2775 + checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" 2776 + dependencies = [ 2777 + "log", 2778 + "once_cell", 2779 + "ring", 2780 + "rustls-pki-types", 2781 + "rustls-webpki", 2782 + "subtle", 2783 + "zeroize", 2784 + ] 2785 + 2786 + [[package]] 2787 + name = "rustls-pki-types" 2788 + version = "1.13.0" 2789 + source = "registry+https://github.com/rust-lang/crates.io-index" 2790 + checksum = "94182ad936a0c91c324cd46c6511b9510ed16af436d7b5bab34beab0afd55f7a" 2791 + dependencies = [ 2792 + "zeroize", 2793 + ] 2794 + 2795 + [[package]] 2796 + name = "rustls-webpki" 2797 + version = "0.103.8" 2798 + source = "registry+https://github.com/rust-lang/crates.io-index" 2799 + checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" 2800 + dependencies = [ 2801 + "ring", 2802 + "rustls-pki-types", 2803 + "untrusted", 2804 + ] 2805 + 2806 + [[package]] 2593 2807 name = "rustversion" 2594 2808 version = "1.0.22" 2595 2809 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2837 3051 "anyhow", 2838 3052 "axum", 2839 3053 "backtrace", 2840 - "channels-console", 2841 3054 "chrono", 2842 3055 "console 0.16.1", 2843 3056 "easing-function", 2844 3057 "env_logger", 2845 3058 "getrandom 0.2.16", 3059 + "hotpath", 2846 3060 "indicatif", 2847 3061 "insta", 2848 3062 "itertools 0.14.0", ··· 2993 3207 ] 2994 3208 2995 3209 [[package]] 3210 + name = "strsim" 3211 + version = "0.11.1" 3212 + source = "registry+https://github.com/rust-lang/crates.io-index" 3213 + checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" 3214 + 3215 + [[package]] 2996 3216 name = "strum" 2997 3217 version = "0.27.2" 2998 3218 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3012 3232 "quote", 3013 3233 "syn 2.0.110", 3014 3234 ] 3235 + 3236 + [[package]] 3237 + name = "subtle" 3238 + version = "2.6.1" 3239 + source = "registry+https://github.com/rust-lang/crates.io-index" 3240 + checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" 3015 3241 3016 3242 [[package]] 3017 3243 name = "svgtypes" ··· 3517 3743 checksum = "81e544489bf3d8ef66c953931f56617f423cd4b5494be343d9b9d3dda037b9a3" 3518 3744 3519 3745 [[package]] 3746 + name = "untrusted" 3747 + version = "0.9.0" 3748 + source = "registry+https://github.com/rust-lang/crates.io-index" 3749 + checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" 3750 + 3751 + [[package]] 3752 + name = "ureq" 3753 + version = "3.1.4" 3754 + source = "registry+https://github.com/rust-lang/crates.io-index" 3755 + checksum = "d39cb1dbab692d82a977c0392ffac19e188bd9186a9f32806f0aaa859d75585a" 3756 + dependencies = [ 3757 + "base64", 3758 + "cookie_store", 3759 + "flate2", 3760 + "log", 3761 + "percent-encoding", 3762 + "rustls", 3763 + "rustls-pki-types", 3764 + "serde", 3765 + "serde_json", 3766 + "ureq-proto", 3767 + "utf-8", 3768 + "webpki-roots", 3769 + ] 3770 + 3771 + [[package]] 3772 + name = "ureq-proto" 3773 + version = "0.5.3" 3774 + source = "registry+https://github.com/rust-lang/crates.io-index" 3775 + checksum = "d81f9efa9df032be5934a46a068815a10a042b494b6a58cb0a1a97bb5467ed6f" 3776 + dependencies = [ 3777 + "base64", 3778 + "http", 3779 + "httparse", 3780 + "log", 3781 + ] 3782 + 3783 + [[package]] 3520 3784 name = "url" 3521 3785 version = "2.5.7" 3522 3786 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3730 3994 ] 3731 3995 3732 3996 [[package]] 3997 + name = "webpki-roots" 3998 + version = "1.0.4" 3999 + source = "registry+https://github.com/rust-lang/crates.io-index" 4000 + checksum = "b2878ef029c47c6e8cf779119f20fcf52bde7ad42a731b2a304bc221df17571e" 4001 + dependencies = [ 4002 + "rustls-pki-types", 4003 + ] 4004 + 4005 + [[package]] 3733 4006 name = "weezl" 3734 4007 version = "0.1.12" 3735 4008 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3930 4203 checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" 3931 4204 dependencies = [ 3932 4205 "windows-link 0.2.1", 4206 + ] 4207 + 4208 + [[package]] 4209 + name = "windows-sys" 4210 + version = "0.52.0" 4211 + source = "registry+https://github.com/rust-lang/crates.io-index" 4212 + checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 4213 + dependencies = [ 4214 + "windows-targets 0.52.6", 3933 4215 ] 3934 4216 3935 4217 [[package]] ··· 4358 4640 "syn 2.0.110", 4359 4641 "synstructure", 4360 4642 ] 4643 + 4644 + [[package]] 4645 + name = "zeroize" 4646 + version = "1.8.2" 4647 + source = "registry+https://github.com/rust-lang/crates.io-index" 4648 + checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" 4361 4649 4362 4650 [[package]] 4363 4651 name = "zerotrie"
+5 -4
Cargo.toml
··· 25 25 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 26 26 27 27 [features] 28 - default = ["vst", "video", "video-server", "channels-console"] 28 + default = ["vst", "video", "video-server", "hotpath"] 29 29 vst = [ 30 30 "rand/thread_rng", 31 31 "dep:env_logger", ··· 43 43 ] 44 44 video-server = ["dep:axum"] 45 45 serde-wasm-bindgen = ["dep:serde-wasm-bindgen"] 46 - channels-console = ["dep:channels-console"] 46 + hotpath = ["dep:hotpath", "hotpath/hotpath"] 47 + hotpath-alloc = ["hotpath/hotpath-alloc"] 48 + hotpath-off = ["hotpath/hotpath-off"] 47 49 48 50 [dependencies] 49 51 nih_plug = { git = "https://github.com/robbert-vdh/nih-plug.git", features = [ ··· 98 100 quick-xml = "0.38.4" 99 101 num = "0.4.3" 100 102 serde-wasm-bindgen = { version = "0.6.5", optional = true } 101 - channels-console = { version = "0.3.3", optional = true } 102 - 103 + hotpath = { version = "0.7", optional = true } 103 104 104 105 [dev-dependencies] 105 106 insta = "1.44.1"
+2 -3
src/video/encoding.rs
··· 79 79 80 80 let (tx, rx) = std::sync::mpsc::sync_channel::<EngineOutput>(1_000); 81 81 82 - #[cfg(feature = "channels-console")] 83 - let (tx, rx) = 84 - channels_console::instrument!((tx, rx), capacity = 1_000, log = true); 82 + #[cfg(feature = "hotpath")] 83 + let (tx, rx) = hotpath::channel!((tx, rx), capacity = 1_000, log = true); 85 84 86 85 let parallelism = std::thread::available_parallelism() 87 86 .map(|n| n.get())