diff --git a/.forgejo/workflows/build.nix b/.forgejo/workflows/build.nix index cb702884..1ecda4c4 100644 --- a/.forgejo/workflows/build.nix +++ b/.forgejo/workflows/build.nix @@ -1,6 +1,6 @@ {pkgs?import{}}: pkgs.mkShell (with pkgs; { nativeBuildInputs = [ - cargo + rustup pkg-config freetype libclang diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index 3a59928b..b2f50127 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -7,5 +7,5 @@ jobs: - run: nix-channel --list && nix-channel --update - run: nix-shell -p git --command 'git clone --recursive $GITHUB_SERVER_URL/$GITHUB_REPOSITORY .' - run: whoami && pwd && ls -al - - run: nix-shell --command 'cargo version -vv && cargo test && cargo doc && cargo build --release && cloc crates/tek/src' .forgejo/workflows/build.nix + - run: nix-shell --command 'rustup install nightly && cargo version -vv && cargo test && cargo doc && cargo build --release && cloc crates/tek/src' .forgejo/workflows/build.nix - run: nix-shell -p docker --command "docker run --security-opt seccomp=unconfined -v $PWD:/volume xd009642/tarpaulin cargo tarpaulin --out Html --all-features" diff --git a/edn/Cargo.lock b/edn/Cargo.lock index 6c6ca5a3..943a03dd 100644 --- a/edn/Cargo.lock +++ b/edn/Cargo.lock @@ -23,6 +23,15 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + [[package]] name = "autocfg" version = "1.4.0" @@ -60,6 +69,18 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +[[package]] +name = "by_address" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + [[package]] name = "cassowary" version = "0.3.0" @@ -210,6 +231,12 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "fast-srgb8" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1" + [[package]] name = "fnv" version = "1.0.7" @@ -222,6 +249,17 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + [[package]] name = "gimli" version = "0.31.1" @@ -418,6 +456,31 @@ dependencies = [ "num-traits", ] +[[package]] +name = "palette" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cbf71184cc5ecc2e4e1baccdb21026c20e5fc3dcf63028a086131b3ab00b6e6" +dependencies = [ + "approx", + "fast-srgb8", + "palette_derive", + "phf", + "rand", +] + +[[package]] +name = "palette_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5030daf005bface118c096f510ffb781fc28f9ab6a32ab224d8631be6851d30" +dependencies = [ + "by_address", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "parking_lot" version = "0.12.3" @@ -447,6 +510,57 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_macros", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared", + "rand", +] + +[[package]] +name = "phf_macros" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + [[package]] name = "proc-macro2" version = "1.0.92" @@ -465,6 +579,36 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + [[package]] name = "ratatui" version = "0.29.0" @@ -562,6 +706,12 @@ dependencies = [ "libc", ] +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + [[package]] name = "smallvec" version = "1.13.2" @@ -604,9 +754,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.94" +version = "2.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "987bc0be1cdea8b10216bd06e2ca407d40b9543468fafd3ddfb02f36e77f71f3" +checksum = "46f71c0377baf4ef1cc3e3402ded576dccc315800fbc62dfc7fe04b009773b4a" dependencies = [ "proc-macro2", "quote", @@ -621,16 +771,12 @@ dependencies = [ "itertools 0.14.0", "konst", "tek_layout", + "tek_tui", ] [[package]] name = "tek_engine" version = "0.2.0" -dependencies = [ - "better-panic", - "crossterm", - "ratatui", -] [[package]] name = "tek_layout" @@ -639,6 +785,20 @@ dependencies = [ "tek_engine", ] +[[package]] +name = "tek_tui" +version = "0.2.0" +dependencies = [ + "better-panic", + "crossterm", + "palette", + "rand", + "ratatui", + "tek_edn", + "tek_engine", + "tek_layout", +] + [[package]] name = "typewit" version = "1.11.0" @@ -798,3 +958,24 @@ name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/edn/Cargo.toml b/edn/Cargo.toml index 0d09a35e..64c4420c 100644 --- a/edn/Cargo.toml +++ b/edn/Cargo.toml @@ -12,3 +12,6 @@ tek_layout = { optional = true, path = "../layout" } [features] default = ["layout"] layout = [ "tek_layout" ] + +[dev-dependencies] +tek_tui = { path = "../tui" } diff --git a/edn/examples/edn01.rs b/edn/examples/edn01.rs index e8d46b7b..949df0cc 100644 --- a/edn/examples/edn01.rs +++ b/edn/examples/edn01.rs @@ -1,4 +1,5 @@ -use tek_edn::{*, tek_layout::{*, tek_engine::{*, tui::{*, TuiRun}}}}; +use tek_tui::{*, tek_layout::{*, tek_engine::*}}; +use tek_edn::*; use std::sync::{Arc, RwLock}; const EDN: &'static str = include_str!("edn01.edn"); diff --git a/edn/examples/edn02.rs b/edn/examples/edn02.rs index 7b15bf64..11e7962c 100644 --- a/edn/examples/edn02.rs +++ b/edn/examples/edn02.rs @@ -1,4 +1,5 @@ -use tek_edn::{*, tek_layout::{*, tek_engine::{*, tui::{*, TuiRun}}}}; +use tek_tui::{*, tek_layout::{*, tek_engine::*}}; +use tek_edn::*; use std::sync::{Arc, RwLock}; const EDN: &'static str = include_str!("edn02.edn");