Compare commits

..

49 Commits

Author SHA1 Message Date
release-plz-for-ac-qu-ai-nt[bot]
6c50f6bd20 chore(ac-qu-ai-nt-core): release v0.0.5 2024-10-17 19:26:29 +00:00
J / Jacob Babich
b5c7dfe667 fix(ac-qu-ai-nt-core): raise the minimum acceptable version of rten to 0.13.1 2024-10-17 15:22:53 -04:00
J / Jacob Babich
72a33524a5 chore(ac-qu-ai-nt-core): remove surrealdb as a dependency because the BUSL doesn't fit what I want this project to be. sorry. we'll see if I feel inclined to give it another chance
Some checks are pending
Check, build, and test / Check cargo-audit, cargo-deny, clippy, and formatting (push) Waiting to run
Check, build, and test / Check and build ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) ${{ matrix.minimal_or_latest.job_name_suffix }} (map[build_command:cargo build --verbose cache_key:latest check_command:cargo check --verbose job_name_suffix:(with lat… (push) Waiting to run
Check, build, and test / Check and build ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) ${{ matrix.minimal_or_latest.job_name_suffix }} (map[build_command:cargo minimal-versions build --direct --verbose cache_key:minimal check_command:cargo minimal-versio… (push) Waiting to run
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[install_prerequisite:sudo apt-get update && sudo apt-get install musl-dev musl-tools && sudo ln -s /bin/g++ /bin/musl-g++ runner:ubuntu-latest target:x86_64-unknown-linux-mu… (push) Waiting to run
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:macos-latest target:aarch64-apple-darwin]) (push) Waiting to run
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:macos-latest target:x86_64-apple-darwin]) (push) Waiting to run
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:windows-latest target:x86_64-pc-windows-msvc]) (push) Waiting to run
Check, build, and test / Verify MSRV for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[install_prerequisite:sudo apt-get update && sudo apt-get install musl-dev musl-tools && sudo ln -s /bin/g++ /bin/musl-g++ runner:ubuntu-latest target:x86_64-unkno… (push) Waiting to run
Check, build, and test / Verify MSRV for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[prerequisite_step:rm ~/.cargo/bin/cargo.exe; rm ~/.cargo/bin/rust-analyzer.exe; rm ~/.cargo/bin/rustfmt.exe; rustup update runner:windows-latest target:x86_64-pc-… (push) Waiting to run
Check, build, and test / Verify MSRV for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:macos-latest target:aarch64-apple-darwin]) (push) Waiting to run
Check, build, and test / Verify MSRV for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:macos-latest target:x86_64-apple-darwin]) (push) Waiting to run
Check, build, and test / Verify MSRV for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Release-plz / Release-plz (push) Waiting to run
2024-10-17 02:16:42 -04:00
J / Jacob Babich
1d7d24aa07 chore: allow dependencies to use the Unlicense (just like this project does!) 2024-10-17 02:14:31 -04:00
J / Jacob Babich
24f60fbca2 chore(ac-qu-ai-nt-core): upgrade surrealdb to 2 and I'm not sure why it defaulted to an old version
Some checks are pending
Check, build, and test / Verify MSRV for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[prerequisite_step:rm ~/.cargo/bin/cargo.exe; rm ~/.cargo/bin/rust-analyzer.exe; rm ~/.cargo/bin/rustfmt.exe; rustup update runner:windows-latest target:x86_64-pc-… (push) Waiting to run
Check, build, and test / Verify MSRV for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:macos-latest target:aarch64-apple-darwin]) (push) Waiting to run
Check, build, and test / Verify MSRV for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:macos-latest target:x86_64-apple-darwin]) (push) Waiting to run
Check, build, and test / Verify MSRV for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Check, build, and test / Check cargo-audit, cargo-deny, clippy, and formatting (push) Waiting to run
Check, build, and test / Check and build ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) ${{ matrix.minimal_or_latest.job_name_suffix }} (map[build_command:cargo build --verbose cache_key:latest check_command:cargo check --verbose job_name_suffix:(with lat… (push) Waiting to run
Check, build, and test / Check and build ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) ${{ matrix.minimal_or_latest.job_name_suffix }} (map[build_command:cargo minimal-versions build --direct --verbose cache_key:minimal check_command:cargo minimal-versio… (push) Waiting to run
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[install_prerequisite:sudo apt-get update && sudo apt-get install musl-dev musl-tools && sudo ln -s /bin/g++ /bin/musl-g++ runner:ubuntu-latest target:x86_64-unknown-linux-mu… (push) Waiting to run
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:macos-latest target:aarch64-apple-darwin]) (push) Waiting to run
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:macos-latest target:x86_64-apple-darwin]) (push) Waiting to run
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:windows-latest target:x86_64-pc-windows-msvc]) (push) Waiting to run
Check, build, and test / Verify MSRV for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[install_prerequisite:sudo apt-get update && sudo apt-get install musl-dev musl-tools && sudo ln -s /bin/g++ /bin/musl-g++ runner:ubuntu-latest target:x86_64-unkno… (push) Waiting to run
Release-plz / Release-plz (push) Waiting to run
2024-10-16 15:35:06 -04:00
J / Jacob Babich
0c1af2ba42 chore(ac-qu-ai-nt-core): add ocrs, rten, and surrealdb as dependencies because I expect to use them in the future and this will allow GitHub Actions to build cache for them or to report back to me that they're incompatible with the currently supporteds 2024-10-16 15:28:51 -04:00
J / Jacob Babich
7455d2a908 chore(ac-qu-ai-nt-core)!: make tracing no longer a default feature 2024-10-16 15:26:09 -04:00
J / Jacob Babich
7f38eb81c6 ci(compile-and-publish-binaries-to-release): install the correct Rust target instead of leaving it unspecified
Some checks are pending
Check, build, and test / Verify MSRV for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:macos-latest target:aarch64-apple-darwin]) (push) Waiting to run
Check, build, and test / Verify MSRV for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:macos-latest target:x86_64-apple-darwin]) (push) Waiting to run
Check, build, and test / Check cargo-audit, cargo-deny, clippy, and formatting (push) Waiting to run
Check, build, and test / Check and build ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) ${{ matrix.minimal_or_latest.job_name_suffix }} (map[build_command:cargo build --verbose cache_key:latest check_command:cargo check --verbose job_name_suffix:(with lat… (push) Waiting to run
Check, build, and test / Check and build ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) ${{ matrix.minimal_or_latest.job_name_suffix }} (map[build_command:cargo minimal-versions build --direct --verbose cache_key:minimal check_command:cargo minimal-versio… (push) Waiting to run
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[install_prerequisite:sudo apt-get update && sudo apt-get install musl-dev musl-tools && sudo ln -s /bin/g++ /bin/musl-g++ runner:ubuntu-latest target:x86_64-unknown-linux-mu… (push) Waiting to run
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:macos-latest target:aarch64-apple-darwin]) (push) Waiting to run
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:macos-latest target:x86_64-apple-darwin]) (push) Waiting to run
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:windows-latest target:x86_64-pc-windows-msvc]) (push) Waiting to run
Check, build, and test / Verify MSRV for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[install_prerequisite:sudo apt-get update && sudo apt-get install musl-dev musl-tools && sudo ln -s /bin/g++ /bin/musl-g++ runner:ubuntu-latest target:x86_64-unkno… (push) Waiting to run
Check, build, and test / Verify MSRV for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[prerequisite_step:rm ~/.cargo/bin/cargo.exe; rm ~/.cargo/bin/rust-analyzer.exe; rm ~/.cargo/bin/rustfmt.exe; rustup update runner:windows-latest target:x86_64-pc-… (push) Waiting to run
Check, build, and test / Verify MSRV for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Release-plz / Release-plz (push) Waiting to run
2024-10-16 02:22:52 -04:00
J
1d94489a89 Merge pull request #23 from babichjacob/release-plz-2024-10-16T06-08-39Z
chore(ac-qu-ai-nt): release v0.0.14
2024-10-16 02:18:06 -04:00
release-plz-for-ac-qu-ai-nt[bot]
833cc52252 chore(ac-qu-ai-nt): release v0.0.14 2024-10-16 06:16:45 +00:00
J / Jacob Babich
f392562f81 style(multibinary): mark the Clippy lint against manually implementing Default for Command as allowed 2024-10-16 02:16:22 -04:00
J / Jacob Babich
3169ab4cda ci(daily): change the time it runs to 09:26 UTC 2024-10-16 02:11:37 -04:00
J / Jacob Babich
7480cdcf96 feat(multibinary): support running the binary without arguments (using a sensible user interface as the default), and improve error reporting by using snafu 2024-10-16 02:07:57 -04:00
J / Jacob Babich
aee2678638 chore(multibinary): add cfg-if and snafu as dependencies 2024-10-16 02:06:50 -04:00
J / Jacob Babich
aa0e7481d6 docs: explain the project breakdown and issue and pull request mechanics 2024-10-15 20:05:29 -04:00
J / Jacob Babich
4a31e2311e ci(compile-and-publish-binaries-to-release): specify the target to build for 2024-10-15 20:05:29 -04:00
J
3fd754fbd2 Merge pull request #20 from babichjacob/release-plz-2024-10-07T20-24-50Z
chore: release
2024-10-15 19:36:30 -04:00
release-plz-for-ac-qu-ai-nt[bot]
786949f79c chore: release 2024-10-15 23:27:22 +00:00
J / Jacob Babich
45e5c037ce ci(daily): change time for running to 23:41 so I can verify it works in a few minutes 2024-10-15 19:24:52 -04:00
J / Jacob Babich
09c42f0546 ci(check-and-build-and-test): in the msrv job, check x86_64-apple-darwin on macos-latest and x86_64-unknown-linux-musl on ubuntu-latest now that it's justifiable with the number of jobs spawning reduced from 1c436c8fb4 2024-10-15 19:15:15 -04:00
J / Jacob Babich
1c436c8fb4 ci(check-and-build-and-test): in the msrv job, remove the crate_directory dimension for a speed up (instead, I just copied and pasted the steps for it) 2024-10-15 19:12:37 -04:00
J / Jacob Babich
6717af965d ci(daily): change time for running to 23:04 so I can verify it works in a few minutes 2024-10-15 19:00:50 -04:00
J / Jacob Babich
4e6d56c044 style(cli-clap): ignore the Args argument because it doesn't get used yet (to satisfy Clippy) 2024-10-15 16:47:50 -04:00
J / Jacob Babich
844494b2ca ci(daily): fix the test job to reference the nightly cache channel 2024-10-15 16:42:51 -04:00
J / Jacob Babich
c60856c7d1 ci(check-and-build-and-test): add checking Clippy and rearrange the job so that the most important problems are detected first 2024-10-15 16:42:32 -04:00
J / Jacob Babich
22733f51e0 chore: build out the infrastructure for commands to be passed to the clap CLI 2024-10-15 16:15:33 -04:00
J / Jacob Babich
c1bab4d55e ci(check-and-build-and-test): fix the cargo-audit command arguments
Some checks are pending
Check, build, and test / Check formatting, cargo-deny, and cargo-audit (push) Waiting to run
Check, build, and test / Check and build ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) ${{ matrix.minimal_or_latest.job_name_suffix }} (map[build_command:cargo build --verbose cache_key:latest check_command:cargo check --verbose job_name_suffix:(with lat… (push) Waiting to run
Check, build, and test / Check and build ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) ${{ matrix.minimal_or_latest.job_name_suffix }} (map[build_command:cargo minimal-versions build --direct --verbose cache_key:minimal check_command:cargo minimal-versio… (push) Waiting to run
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[install_prerequisite:sudo apt-get update && sudo apt-get install musl-dev musl-tools && sudo ln -s /bin/g++ /bin/musl-g++ runner:ubuntu-latest target:x86_64-unknown-linux-mu… (push) Waiting to run
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:macos-latest target:aarch64-apple-darwin]) (push) Waiting to run
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:macos-latest target:x86_64-apple-darwin]) (push) Waiting to run
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:windows-latest target:x86_64-pc-windows-msvc]) (push) Waiting to run
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./cli-clap, map[prerequisite_step:rm ~/.cargo/bin/cargo.exe; rm ~/.cargo/bin/rust-analyzer.exe; rm ~/.cargo/bin/rustfmt.exe; rustup u… (push) Waiting to run
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./cli-clap, map[runner:macos-latest target:aarch64-apple-darwin]) (push) Waiting to run
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./cli-clap, map[runner:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./core, map[prerequisite_step:rm ~/.cargo/bin/cargo.exe; rm ~/.cargo/bin/rust-analyzer.exe; rm ~/.cargo/bin/rustfmt.exe; rustup updat… (push) Waiting to run
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./core, map[runner:macos-latest target:aarch64-apple-darwin]) (push) Waiting to run
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./core, map[runner:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./gui-eframe, map[prerequisite_step:rm ~/.cargo/bin/cargo.exe; rm ~/.cargo/bin/rust-analyzer.exe; rm ~/.cargo/bin/rustfmt.exe; rustup… (push) Waiting to run
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./gui-eframe, map[runner:macos-latest target:aarch64-apple-darwin]) (push) Waiting to run
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./gui-eframe, map[runner:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./multibinary, map[prerequisite_step:rm ~/.cargo/bin/cargo.exe; rm ~/.cargo/bin/rust-analyzer.exe; rm ~/.cargo/bin/rustfmt.exe; rustu… (push) Waiting to run
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./multibinary, map[runner:macos-latest target:aarch64-apple-darwin]) (push) Waiting to run
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./multibinary, map[runner:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./tui-ratatui, map[prerequisite_step:rm ~/.cargo/bin/cargo.exe; rm ~/.cargo/bin/rust-analyzer.exe; rm ~/.cargo/bin/rustfmt.exe; rustu… (push) Waiting to run
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./tui-ratatui, map[runner:macos-latest target:aarch64-apple-darwin]) (push) Waiting to run
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./tui-ratatui, map[runner:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Release-plz / Release-plz (push) Waiting to run
2024-10-15 15:59:07 -04:00
J / Jacob Babich
6036d40def ci(daily): use the correct specifier for rustsec/audit-check (v2.0.0 not v2) 2024-10-15 15:55:04 -04:00
J / Jacob Babich
0f7cd069bb ci(daily): add a workflow with jobs for checking, building, and testing on nightly Rust and for being alerted of issues from cargo-audit 2024-10-15 15:53:24 -04:00
J / Jacob Babich
dace2d531a ci(check-and-build-and-test): add cargo-audit to the formatting-and-deny job to upgrade it to formatting-and-deny-and-audit 2024-10-15 15:43:48 -04:00
J / Jacob Babich
402a6894e1 ci(check-and-build-and-test): increase the timeout of all jobs 2024-10-15 15:28:09 -04:00
J / Jacob Babich
93a8dc907b chore: update llama-cpp-2 and other packages 2024-10-11 15:03:17 -04:00
J / Jacob Babich
32aa88af49 chore: remove llama-cpp-2 patch 2024-10-11 15:02:29 -04:00
J / Jacob Babich
cddad34b0a ci(release-plz): add a Rust cache step hoping to speed up the job
Some checks failed
Release-plz / Release-plz (push) Has been cancelled
2024-10-11 13:36:03 -04:00
J / Jacob Babich
1e683ee2df ci(check-and-build-and-test): in the msrv job, only do the prerequisite step on Windows (the only place not doing it is a problem) 2024-10-11 13:34:33 -04:00
J / Jacob Babich
139548ffc7 ci(check-and-build-and-test): in the msrv job, try making deleting the existing Rust stuff work cross-platform 2024-10-11 13:27:55 -04:00
J / Jacob Babich
efa41c169c ci(check-and-build-and-test): in the msrv job, break up the deletion step so that it may work on Windows 2024-10-11 03:43:26 -04:00
J / Jacob Babich
4940e4a431 ci(check-and-build-and-test): in the msrv job, try removing some Rust toolchain binaries, then run rustup update 2024-10-11 03:37:10 -04:00
J / Jacob Babich
8b0b5d0839 ci(check-and-build-and-test): shuffle steps of the msrv job to try to fix it, and call cargo-msrv instead of cargo msrv 2024-10-11 03:27:13 -04:00
J / Jacob Babich
b7eb5330b5 ci(check-and-build-and-test): in the msrv job, remove existing Rust stuff that's making the Windows MSRV verification fail 2024-10-11 03:22:14 -04:00
J / Jacob Babich
ce1b66d516 ci(check-and-build-and-test): in the msrv job, remove the step to install a Rust toolchain because I expect cargo-msrv to be able to handle it 2024-10-11 03:03:33 -04:00
J / Jacob Babich
1c7cbc1e72 fix(ac-qu-ai-nt-tui-ratatui): write a main function instead of re-exporting so that the declared MSRV can be met
Some checks failed
Release-plz / Release-plz (push) Waiting to run
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./core, map[runner:windows-latest target:x86_64-pc-windows-msvc]) (push) Has been cancelled
Check, build, and test / Check formatting and cargo-deny (push) Has been cancelled
Check, build, and test / Check and build ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) ${{ matrix.minimal_or_latest.job_name_suffix }} (map[build_command:cargo build --verbose cache_key:latest check_command:cargo check --verbose job_name_suffix:(with lat… (push) Has been cancelled
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./core, map[runner:macos-latest target:aarch64-apple-darwin]) (push) Has been cancelled
Check, build, and test / Check and build ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) ${{ matrix.minimal_or_latest.job_name_suffix }} (map[build_command:cargo minimal-versions build --direct --verbose cache_key:minimal check_command:cargo minimal-versio… (push) Has been cancelled
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[install_prerequisite:sudo apt-get update && sudo apt-get install musl-dev musl-tools && sudo ln -s /bin/g++ /bin/musl-g++ runner:ubuntu-latest target:x86_64-unknown-linux-mu… (push) Has been cancelled
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:macos-latest target:aarch64-apple-darwin]) (push) Has been cancelled
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:macos-latest target:x86_64-apple-darwin]) (push) Has been cancelled
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./core, map[runner:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Has been cancelled
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Has been cancelled
Check, build, and test / Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (map[runner:windows-latest target:x86_64-pc-windows-msvc]) (push) Has been cancelled
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./cli-clap, map[runner:macos-latest target:aarch64-apple-darwin]) (push) Has been cancelled
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./cli-clap, map[runner:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Has been cancelled
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./cli-clap, map[runner:windows-latest target:x86_64-pc-windows-msvc]) (push) Has been cancelled
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./gui-eframe, map[runner:macos-latest target:aarch64-apple-darwin]) (push) Has been cancelled
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./gui-eframe, map[runner:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Has been cancelled
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./gui-eframe, map[runner:windows-latest target:x86_64-pc-windows-msvc]) (push) Has been cancelled
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./multibinary, map[runner:macos-latest target:aarch64-apple-darwin]) (push) Has been cancelled
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./multibinary, map[runner:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Has been cancelled
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./multibinary, map[runner:windows-latest target:x86_64-pc-windows-msvc]) (push) Has been cancelled
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./tui-ratatui, map[runner:macos-latest target:aarch64-apple-darwin]) (push) Has been cancelled
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./tui-ratatui, map[runner:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Has been cancelled
Check, build, and test / Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) (./tui-ratatui, map[runner:windows-latest target:x86_64-pc-windows-msvc]) (push) Has been cancelled
2024-10-11 02:47:11 -04:00
J / Jacob Babich
b1e707a77a fix(ac-qu-ai-nt-cli-clap): write a main function instead of re-exporting so that the declared MSRV can be met 2024-10-11 02:46:02 -04:00
J / Jacob Babich
a1a2712895 fix(ac-qu-ai-nt-gui-eframe): write a main function instead of re-exporting so that the declared MSRV can be met 2024-10-11 02:44:58 -04:00
J / Jacob Babich
5b91d2515d fix: make able to build for AArch64/ARM64/aarch64-unknown-linux-gnu (using my fork of llama-cpp-2 until bug fix is incorporated) 2024-10-10 20:22:15 -04:00
J / Jacob Babich
9b38919fc1 chore: run cargo update 2024-10-10 20:20:46 -04:00
J / Jacob Babich
74157b1298 ci(check-and-build-and-test): see if changing the --output-format to json for cargo msrv verify will make it actually show up in the GitHub Actions log
Some checks are pending
Release-plz / Release-plz (push) Waiting to run
2024-10-10 00:40:43 -04:00
J / Jacob Babich
ff6842ad3d ci(check-and-build-and-test): extend the timeout for the msrv job 2024-10-09 23:16:05 -04:00
J / Jacob Babich
5f52981141 ci(check-and-build-and-test): simplify the msrv job, because the output I see for cargo msrv verify is informative enough (not sure why I tried otherwise) 2024-10-09 23:15:17 -04:00
22 changed files with 725 additions and 110 deletions

View File

@@ -18,23 +18,35 @@ env:
CARGO_TERM_COLOR: always
jobs:
formatting-and-deny:
name: Check formatting and cargo-deny
audit-and-deny-and-clippy-and-formatting:
name: Check cargo-audit, cargo-deny, clippy, and formatting
runs-on: ubuntu-latest
timeout-minutes: 2
timeout-minutes: 4
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install stable Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-audit
uses: taiki-e/install-action@cargo-audit
- name: Formatting
run: cargo fmt --check --verbose
- uses: Swatinem/rust-cache@v2
- name: cargo-audit
run: cargo-audit audit --deny warnings
- name: cargo-deny
uses: EmbarkStudios/cargo-deny-action@v2
- name: Clippy
run: cargo clippy
env:
RUSTFLAGS: "--deny warnings"
- name: Formatting
run: cargo fmt --check --verbose
check-and-build:
strategy:
matrix:
@@ -88,7 +100,7 @@ jobs:
target: x86_64-pc-windows-msvc
name: Check and build ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }}) ${{ matrix.minimal_or_latest.job_name_suffix }}
runs-on: ${{ matrix.supporteds.runner }}
timeout-minutes: 5
timeout-minutes: 8
env:
# https://github.com/rust-lang/stacker/issues/80#issuecomment-1547991131
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
@@ -165,7 +177,7 @@ jobs:
target: x86_64-pc-windows-msvc
name: Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }})
runs-on: ${{ matrix.supporteds.runner }}
timeout-minutes: 5
timeout-minutes: 8
steps:
- name: Checkout repository
uses: actions/checkout@v4
@@ -193,49 +205,56 @@ jobs:
msrv:
strategy:
matrix:
crate_directory:
- ./core
- ./cli-clap
- ./gui-eframe
- ./tui-ratatui
- ./multibinary
supporteds:
- runner: macos-latest
target: aarch64-apple-darwin
- runner: macos-latest
target: x86_64-apple-darwin
- runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
- runner: windows-latest
- install_prerequisite: sudo apt-get update && sudo apt-get install musl-dev musl-tools && sudo ln -s /bin/g++ /bin/musl-g++
runner: ubuntu-latest
target: x86_64-unknown-linux-musl
- prerequisite_step: rm ~/.cargo/bin/cargo.exe; rm ~/.cargo/bin/rust-analyzer.exe; rm ~/.cargo/bin/rustfmt.exe; rustup update
runner: windows-latest
target: x86_64-pc-windows-msvc
name: Verify MSRV of ${{ matrix.crate_directory }} for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }})
name: Verify MSRV for ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }})
runs-on: ${{ matrix.supporteds.runner }}
timeout-minutes: 2
timeout-minutes: 8
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install stable Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-msrv
uses: taiki-e/install-action@v2
with:
tool: cargo-msrv
- uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ matrix.supporteds.target }}-latest-variable
cache-on-failure: "true"
- name: Verify declared MSRV (minimum supported Rust version)
id: verify
continue-on-error: true
run: cargo msrv verify
working-directory: ${{ matrix.crate_directory }}
- name: Run prerequisite setup step
if: matrix.supporteds.prerequisite_step
run: ${{ matrix.supporteds.prerequisite_step }}
- name: Report actual MSRV and reason for failing the declared version
if: ${{ steps.verify.outcome == 'failure' }}
run: cargo msrv find && exit 1
working-directory: ${{ matrix.crate_directory }}
- name: Install cargo-msrv
uses: taiki-e/install-action@v2
with:
tool: cargo-msrv
- name: Verify core's declared MSRV (minimum supported Rust version)
run: cargo-msrv verify --output-format json
working-directory: ./core
- name: Verify cli-clap's declared MSRV (minimum supported Rust version)
run: cargo-msrv verify --output-format json
working-directory: ./cli-clap
- name: Verify gui-eframe's declared MSRV (minimum supported Rust version)
run: cargo-msrv verify --output-format json
working-directory: ./gui-eframe
- name: Verify tui-ratatui's declared MSRV (minimum supported Rust version)
run: cargo-msrv verify --output-format json
working-directory: ./tui-ratatui
- name: Verify multibinary's declared MSRV (minimum supported Rust version)
run: cargo-msrv verify --output-format json
working-directory: ./multibinary

View File

@@ -65,6 +65,8 @@ jobs:
- name: Install stable Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.supporteds.target }}
- uses: Swatinem/rust-cache@v2
with:
@@ -72,7 +74,7 @@ jobs:
cache-on-failure: "true"
- name: Build for release
run: cargo build --release --verbose
run: cargo build --release --verbose --target ${{ matrix.supporteds.target }}
# Have to do it like this because of https://github.com/actions/runner/issues/1985
- if: startsWith(github.event.release.tag_name, 'ac-qu-ai-nt-v')

157
.github/workflows/daily.yml vendored Normal file
View File

@@ -0,0 +1,157 @@
name: Daily
on:
schedule:
- cron: "26 9 * * *"
jobs:
audit:
name: Use `cargo-audit` to create issues for vulnerabilities or other problems
runs-on: ubuntu-latest
timeout-minutes: 4
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: rustsec/audit-check@v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
check-and-build-with-nightly:
strategy:
matrix:
supporteds:
- runner: macos-latest
target: aarch64-apple-darwin
- runner: macos-latest
target: x86_64-apple-darwin
- install_prerequisite: sudo apt-get update && sudo apt-get install musl-dev musl-tools gcc-aarch64-linux-gnu g++-aarch64-linux-gnu && sudo ln -s /bin/g++ /bin/musl-g++
runner: ubuntu-latest
target: aarch64-unknown-linux-gnu
- install_prerequisite: sudo apt-get update && sudo apt-get install musl-dev musl-tools gcc-aarch64-linux-gnu g++-aarch64-linux-gnu && sudo ln -s /bin/g++ /bin/musl-g++
runner: ubuntu-latest
target: aarch64-unknown-linux-musl
- runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
- install_prerequisite: sudo apt-get update && sudo apt-get install musl-dev musl-tools && sudo ln -s /bin/g++ /bin/musl-g++
runner: ubuntu-latest
target: x86_64-unknown-linux-musl
# I would like to support this but I don't know how to install the dependencies to be able to
# - runner: windows-latest
# target: aarch64-pc-windows-gnullvm
- runner: windows-latest
target: aarch64-pc-windows-msvc
# I don't think supporting this is up to me
# I forgot where I learned this, but
# I don't think I can use a non-Rust dependency (i.e. llama.cpp) here
# - runner: windows-latest
# target: x86_64-pc-windows-gnu
- runner: windows-latest
target: x86_64-pc-windows-msvc
name: Check and build ${{ matrix.supporteds.target }} with nightly Rust (on ${{ matrix.supporteds.runner }}) ${{ matrix.minimal_or_latest.job_name_suffix }}
runs-on: ${{ matrix.supporteds.runner }}
timeout-minutes: 8
env:
# https://github.com/rust-lang/stacker/issues/80#issuecomment-1547991131
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-gnu-gcc # TODO: shouldn't this be something to do with musl, not gcc?
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install prerequisite build chain
if: matrix.supporteds.install_prerequisite
run: ${{ matrix.supporteds.install_prerequisite }}
- name: Install nightly Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
targets: ${{ matrix.supporteds.target }}
- uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ matrix.supporteds.target }}-latest-nightly
cache-on-failure: "true"
- name: Check
run: cargo check --verbose
- name: Build
run: cargo build --verbose
test-with-nightly:
strategy:
matrix:
supporteds:
- runner: macos-latest
target: aarch64-apple-darwin
- runner: macos-latest
target: x86_64-apple-darwin
# Not able to be tested in GitHub Actions (without emulation, at least)
# - runner: ubuntu-latest
# target: aarch64-unknown-linux-gnu
# Not able to be tested in GitHub Actions (without emulation, at least)
# - runner: ubuntu-latest
# target: aarch64-unknown-linux-musl
- runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
- install_prerequisite: sudo apt-get update && sudo apt-get install musl-dev musl-tools && sudo ln -s /bin/g++ /bin/musl-g++
runner: ubuntu-latest
target: x86_64-unknown-linux-musl
# Not able to be tested in GitHub Actions (without emulation, at least)
# - runner: windows-latest
# target: aarch64-pc-windows-gnullvm
# Not able to be tested in GitHub Actions (without emulation, at least)
# - runner: windows-latest
# target: aarch64-pc-windows-msvc
# I don't think supporting this is up to me
# I forgot where I learned this, but
# I don't think I can use a non-Rust dependency (i.e. llama.cpp) here
# - runner: windows-latest
# target: x86_64-pc-windows-gnu
- runner: windows-latest
target: x86_64-pc-windows-msvc
name: Test ${{ matrix.supporteds.target }} with nightly Rust (on ${{ matrix.supporteds.runner }})
runs-on: ${{ matrix.supporteds.runner }}
timeout-minutes: 8
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install prerequisite build chain
if: matrix.supporteds.install_prerequisite
run: ${{ matrix.supporteds.install_prerequisite }}
- name: Install nightly Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
targets: ${{ matrix.supporteds.target }}
- name: Install Nextest
uses: taiki-e/install-action@cargo-nextest
- uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ matrix.supporteds.target }}-latest-nightly
cache-on-failure: "true"
- name: Test
run: cargo nextest run --target ${{ matrix.supporteds.target }}

View File

@@ -20,13 +20,18 @@ jobs:
with:
app-id: ${{ secrets.RELEASE_PLZ_GITHUB_APP_ID }}
private-key: ${{ secrets.RELEASE_PLZ_GITHUB_APP_SECRET }}
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.generate-token.outputs.token }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run release-plz
uses: MarcoIeni/release-plz-action@v0.5
env:

306
Cargo.lock generated
View File

@@ -4,19 +4,21 @@ version = 3
[[package]]
name = "ac-qu-ai-nt"
version = "0.0.12"
version = "0.0.14"
dependencies = [
"ac-qu-ai-nt-cli-clap",
"ac-qu-ai-nt-gui-eframe",
"ac-qu-ai-nt-tui-ratatui",
"cfg-if",
"clap",
"dirs-next",
"snafu",
"tracing-subscriber",
]
[[package]]
name = "ac-qu-ai-nt-cli-clap"
version = "0.0.8"
version = "0.0.9"
dependencies = [
"clap",
"tracing",
@@ -24,23 +26,25 @@ dependencies = [
[[package]]
name = "ac-qu-ai-nt-core"
version = "0.0.3"
version = "0.0.5"
dependencies = [
"llama-cpp-2",
"ocrs",
"rten",
"snafu",
"tracing",
]
[[package]]
name = "ac-qu-ai-nt-gui-eframe"
version = "0.0.5"
version = "0.0.6"
dependencies = [
"tracing",
]
[[package]]
name = "ac-qu-ai-nt-tui-ratatui"
version = "0.0.5"
version = "0.0.6"
dependencies = [
"tracing",
]
@@ -104,12 +108,18 @@ dependencies = [
]
[[package]]
name = "bindgen"
version = "0.69.4"
name = "anyhow"
version = "1.0.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0"
checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6"
[[package]]
name = "bindgen"
version = "0.69.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088"
dependencies = [
"bitflags",
"bitflags 2.6.0",
"cexpr",
"clang-sys",
"itertools",
@@ -120,12 +130,18 @@ dependencies = [
"proc-macro2",
"quote",
"regex",
"rustc-hash",
"rustc-hash 1.1.0",
"shlex",
"syn",
"which",
]
[[package]]
name = "bitflags"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
version = "2.6.0"
@@ -133,10 +149,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
[[package]]
name = "cc"
version = "1.1.28"
name = "bumpalo"
version = "3.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e80e3b6a3ab07840e1cae9b0666a63970dc28e8ed5ffbcdacbfc760c281bfc1"
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "cc"
version = "1.1.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58e804ac3194a48bb129643eb1d62fcc20d18c6b8c181704489353d13120bcd1"
dependencies = [
"jobserver",
"libc",
@@ -171,9 +193,9 @@ dependencies = [
[[package]]
name = "clap"
version = "4.5.18"
version = "4.5.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3"
checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8"
dependencies = [
"clap_builder",
"clap_derive",
@@ -181,9 +203,9 @@ dependencies = [
[[package]]
name = "clap_builder"
version = "4.5.18"
version = "4.5.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b"
checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54"
dependencies = [
"anstream",
"anstyle",
@@ -224,6 +246,31 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
[[package]]
name = "crossbeam-deque"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d"
dependencies = [
"crossbeam-epoch",
"crossbeam-utils",
]
[[package]]
name = "crossbeam-epoch"
version = "0.9.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-utils"
version = "0.8.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
[[package]]
name = "dirs-next"
version = "2.0.0"
@@ -281,6 +328,16 @@ dependencies = [
"windows-sys",
]
[[package]]
name = "flatbuffers"
version = "24.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8add37afff2d4ffa83bc748a70b4b1370984f6980768554182424ef71447c35f"
dependencies = [
"bitflags 1.3.2",
"rustc_version",
]
[[package]]
name = "getrandom"
version = "0.2.15"
@@ -304,6 +361,12 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hermit-abi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
[[package]]
name = "home"
version = "0.5.9"
@@ -365,13 +428,19 @@ dependencies = [
"windows-targets",
]
[[package]]
name = "libm"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058"
[[package]]
name = "libredox"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
dependencies = [
"bitflags",
"bitflags 2.6.0",
"libc",
]
@@ -383,9 +452,9 @@ checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
[[package]]
name = "llama-cpp-2"
version = "0.1.81"
version = "0.1.82"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e021ce2fa50d729822c6d254cc4bd691b91a5d3a104f1664af1bbc7f04a05906"
checksum = "e40528912f1212003f65912c0ad1d2d2d0302e53557e0ea3cd12b5706a9223ca"
dependencies = [
"enumflags2",
"llama-cpp-sys-2",
@@ -395,9 +464,9 @@ dependencies = [
[[package]]
name = "llama-cpp-sys-2"
version = "0.1.81"
version = "0.1.82"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "322ec6503938947577e093c304736d8a86e2c743c1d9fe3ad79ccd8b345c23f4"
checksum = "ccfde3214b7b8bcc25448198df1add0630695c7a2773a60400572bf5156b9335"
dependencies = [
"bindgen",
"cc",
@@ -444,14 +513,36 @@ dependencies = [
]
[[package]]
name = "once_cell"
version = "1.20.1"
name = "num_cpus"
version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1"
checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
dependencies = [
"portable-atomic",
"hermit-abi",
"libc",
]
[[package]]
name = "ocrs"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e27323c35856a09bb646304ddd579ae0d5b330acfdfb2442e2f15f1407b6ee00"
dependencies = [
"anyhow",
"rayon",
"rten",
"rten-imageproc",
"rten-tensor",
"thiserror",
"wasm-bindgen",
]
[[package]]
name = "once_cell"
version = "1.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
[[package]]
name = "overload"
version = "0.1.1"
@@ -464,12 +555,6 @@ version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02"
[[package]]
name = "portable-atomic"
version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2"
[[package]]
name = "prettyplease"
version = "0.2.22"
@@ -482,9 +567,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
version = "1.0.86"
version = "1.0.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a"
dependencies = [
"unicode-ident",
]
@@ -498,6 +583,26 @@ dependencies = [
"proc-macro2",
]
[[package]]
name = "rayon"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
dependencies = [
"either",
"rayon-core",
]
[[package]]
name = "rayon-core"
version = "1.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
dependencies = [
"crossbeam-deque",
"crossbeam-utils",
]
[[package]]
name = "redox_users"
version = "0.4.6"
@@ -538,25 +643,97 @@ version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
[[package]]
name = "rten"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52026aa6d9bc40ac0d52bfeb4bc81d4fd5b7866825af1826ed7a4d74bd7574c4"
dependencies = [
"flatbuffers",
"libm",
"num_cpus",
"rayon",
"rten-simd",
"rten-tensor",
"rten-vecmath",
"rustc-hash 2.0.0",
"smallvec",
"wasm-bindgen",
]
[[package]]
name = "rten-imageproc"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2cbf57cb94ff55c8107d534114d23bc8116bb64d68da0927c972db150bea3279"
dependencies = [
"rten-tensor",
]
[[package]]
name = "rten-simd"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f1bb63fc8a157699e42a501cf43512871b20d3bea755f3ffac3ab63f1af10c4"
[[package]]
name = "rten-tensor"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "575ec5dbc7e7059eb4271bca1c06420d240e8a377593cbac41a0c7227ec8645d"
dependencies = [
"smallvec",
]
[[package]]
name = "rten-vecmath"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af98a4e48d69c5aa2167d3adb7a8c1585602486a1aedd1ee8b3d684f98059396"
dependencies = [
"rten-simd",
]
[[package]]
name = "rustc-hash"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
[[package]]
name = "rustc-hash"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152"
[[package]]
name = "rustc_version"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
dependencies = [
"semver",
]
[[package]]
name = "rustix"
version = "0.38.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811"
dependencies = [
"bitflags",
"bitflags 2.6.0",
"errno",
"libc",
"linux-raw-sys",
"windows-sys",
]
[[package]]
name = "semver"
version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
[[package]]
name = "sharded-slab"
version = "0.1.7"
@@ -607,9 +784,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "syn"
version = "2.0.77"
version = "2.0.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed"
checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590"
dependencies = [
"proc-macro2",
"quote",
@@ -727,6 +904,61 @@ version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e"
dependencies = [
"cfg-if",
"once_cell",
"wasm-bindgen-macro",
]
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358"
dependencies = [
"bumpalo",
"log",
"once_cell",
"proc-macro2",
"quote",
"syn",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
]
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68"
dependencies = [
"proc-macro2",
"quote",
"syn",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d"
[[package]]
name = "which"
version = "4.4.2"

View File

@@ -5,6 +5,7 @@ This is a placeholder while I take small steps to build out the project.
# Installation
## Automatically Updatable
You won't find it very useful yet, because it doesn't really do much of anything, but you can install the multibinary with [Binstall](https://github.com/cargo-bins/cargo-binstall). This means you don't need to have the same development environment (which will require the Vulkan SDK and CUDA Toolkit in the future) in order to use the program, because you'll just download a precompiled executable.
```sh
@@ -12,28 +13,35 @@ cargo-binstall -y ac-qu-ai-nt
```
Install [`cargo-update`](https://github.com/nabijaczleweli/cargo-update) and periodically run
```sh
cargo install-update --all
```
in order to keep this program up to date.
I'm not sure if you need a Rust compiler installed for either or if they can work standalone.
## Just the Executable
Head to [the Releases page](https://github.com/babichjacob/ac-qu-ai-nt/releases) and download the asset corresponding to your computer architecture and operating system.
Decompress the archive and place the executable contained within it somewhere useful to you (e.g. in a directory in [your `PATH` variable](https://superuser.com/a/284351)).
# Usage
If it's your preference, you should be able to double click the executable in the folder to be able to run it (defaulting to launching a graphical interface (once I actually make one lol)).
You could also type
```sh
ac-qu-ai-nt
```
on the command line to run it. This is also a way to launch a GUI (once there actually is one) for the application.
## Command Line Interface
It's going to be a goal of this project for there to be feature parity between the GUI, CLI, and TUI.
If you want to use its command line interface, start with
@@ -41,13 +49,22 @@ If you want to use its command line interface, start with
```sh
ac-qu-ai-nt cli
```
to see what capabilities are available.
(This is an alias for `ac-qu-ai-nt cli-clap` to allow the possibility of experimenting with different implementations of the same type of interface.)
# Contributing
This is a summary of the crates I expect to be in this project and how they are used:
## Issues and Pull Requests
Please create an issue before working on a pull request. It's helpful for you to know if the idea you have in mind will for sure be incorporated into the project, and won't require you to _acquaint_ yourself with the project internals. It even opens the floor for someone else to do the work implementing it for you.
Some [existing issues are labeled `straightforward`](https://github.com/babichjacob/ac-qu-ai-nt/issues?q=is%3Aissue+is%3Aopen+label%3Astraightforward) and expected to be the easiest to work on, if you'd like to try.
## Project Breakdown
This is a summary of the crates in this project and how they are used:
```mermaid
flowchart TD
@@ -59,6 +76,28 @@ gui-eframe --> multibinary
tui-ratatui --> multibinary
```
### `core`
The core of the project, where code for large language model and embedding model inference using [`llama-cpp-2`](https://crates.io/crates/llama-cpp-2) will be (because it's not started yet at the time of writing), where ingesting data will be done, and where public APIs that the other crates (`cli-clap`, `gui-eframe`, and `tui-ratatui`) use will be.
Each of the interface crates are expected to have feature parity (as in capability, not as in a Cargo feature) where possible, but we'll see how that goes.
### `cli-clap`
A command line interface (CLI) for the project written with [`clap`](https://crates.io/crates/clap).
### `gui-eframe`
A graphical user interface (GUI) for the project written with [`eframe`](https://crates.io/crates/eframe) for [`egui`](https://crates.io/crates/egui).
As of right now, it isn't started yet.
### `tui-ratatui`
A terminal user interface (TUI) for the project written with [`ratatui`](https://crates.io/crates/ratatui).
As of right now, it isn't started yet.
## Versioning
This project aims to adhere to [semantic versioning](https://semver.org/) using [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary), conducted by [Release-plz](https://release-plz.ieni.dev/).
@@ -74,8 +113,9 @@ All the crates in this project have a [minimum supported Rust version (MSRV)](ht
## License
All contents of this repository are licensed under either the
* [MIT license](LICENSE-MIT), or
* [Apache 2.0 license](LICENSE-APACHE), or
* [Unlicense](LICENSE-UNLICENSE)
- [MIT license](LICENSE-MIT), or
- [Apache 2.0 license](LICENSE-APACHE), or
- [Unlicense](LICENSE-UNLICENSE)
at your option.

View File

@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.0.9](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-cli-clap-v0.0.8...ac-qu-ai-nt-cli-clap-v0.0.9) - 2024-10-15
### Fixed
- *(ac-qu-ai-nt-cli-clap)* write a `main` function instead of re-exporting so that the declared MSRV can be met
### Other
- *(cli-clap)* ignore the `Args` argument because it doesn't get used yet (to satisfy Clippy)
- build out the infrastructure for commands to be passed to the clap CLI
## [0.0.8](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-cli-clap-v0.0.7...ac-qu-ai-nt-cli-clap-v0.0.8) - 2024-10-07
### Other

View File

@@ -1,7 +1,7 @@
[package]
name = "ac-qu-ai-nt-cli-clap"
description = "A CLI (written with clap) for ac-qu-ai-nt"
version = "0.0.8"
version = "0.0.9"
edition = "2021"
rust-version = "1.76"

View File

@@ -1,4 +1,15 @@
pub fn main() {
use clap::{Parser, Subcommand};
#[derive(Debug, Subcommand)]
enum Command {}
#[derive(Debug, Parser)]
pub struct Args {
#[command(subcommand)]
command: Command,
}
pub fn main(_args: Args) {
#[cfg(feature = "tracing")]
tracing::info!("What's up, world?");
}

View File

@@ -1 +1,7 @@
use ac_qu_ai_nt_cli_clap::main;
use clap::Parser;
fn main() {
let args = ac_qu_ai_nt_cli_clap::Args::parse();
ac_qu_ai_nt_cli_clap::main(args);
}

View File

@@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.0.5](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-core-v0.0.4...ac-qu-ai-nt-core-v0.0.5) - 2024-10-17
### Fixed
- *(ac-qu-ai-nt-core)* raise the minimum acceptable version of `rten` to `0.13.1`
### Other
- *(ac-qu-ai-nt-core)* remove `surrealdb` as a dependency because the BUSL doesn't fit what I want this project to be. sorry. we'll see if I feel inclined to give it another chance
- *(ac-qu-ai-nt-core)* upgrade `surrealdb` to `2` and I'm not sure why it defaulted to an old version
- *(ac-qu-ai-nt-core)* add `ocrs`, `rten`, and `surrealdb` as dependencies because I expect to use them in the future and this will allow GitHub Actions to build cache for them or to report back to me that they're incompatible with the currently `supporteds`
- *(ac-qu-ai-nt-core)* [**breaking**] make `tracing` no longer a default feature
## [0.0.4](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-core-v0.0.3...ac-qu-ai-nt-core-v0.0.4) - 2024-10-15
### Other
- update `llama-cpp-2` and other packages
- *(ac-qu-ai-nt-core)* update `llama-cpp-2`
- *(core)* add `snafu` as a dependency
## [0.0.3](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-core-v0.0.2...ac-qu-ai-nt-core-v0.0.3) - 2024-10-07
### Other

View File

@@ -1,7 +1,7 @@
[package]
name = "ac-qu-ai-nt-core"
description = "The core library of ac-qu-ai-nt. If you're looking for the application, see cli-clap or gui-eframe or tui-ratatui or the multibinary"
version = "0.0.3"
version = "0.0.5"
edition = "2021"
rust-version = "1.76"
@@ -10,11 +10,13 @@ license = { workspace = true }
repository = { workspace = true }
[features]
default = ["tracing"]
default = []
tracing = ["dep:tracing"]
[dependencies]
llama-cpp-2 = "0.1.81"
llama-cpp-2 = "0.1.82"
ocrs = "0.9"
rten = "0.13.1"
snafu = { workspace = true }
tracing = { workspace = true, optional = true }

View File

@@ -93,7 +93,8 @@ allow = [
"BSD-3-Clause",
"ISC",
"MIT",
"Unicode-DFS-2016"
"Unicode-DFS-2016",
"Unlicense",
]
# The confidence threshold for detecting a license from license text.
# The higher the value, the more closely the license text must be to the

View File

@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.0.6](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-gui-eframe-v0.0.5...ac-qu-ai-nt-gui-eframe-v0.0.6) - 2024-10-15
### Fixed
- *(ac-qu-ai-nt-gui-eframe)* write a `main` function instead of re-exporting so that the declared MSRV can be met
## [0.0.5](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-gui-eframe-v0.0.4...ac-qu-ai-nt-gui-eframe-v0.0.5) - 2024-10-07
### Other

View File

@@ -1,7 +1,7 @@
[package]
name = "ac-qu-ai-nt-gui-eframe"
description = "A GUI (written with egui / eframe) for ac-qu-ai-nt"
version = "0.0.5"
version = "0.0.6"
edition = "2021"
rust-version = "1.76"

View File

@@ -1 +1,3 @@
use ac_qu_ai_nt_gui_eframe::main;
fn main() {
ac_qu_ai_nt_gui_eframe::main();
}

View File

@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.0.14](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-v0.0.13...ac-qu-ai-nt-v0.0.14) - 2024-10-16
### Added
- *(multibinary)* support running the binary without arguments (using a sensible user interface as the default), and improve error reporting by using `snafu`
### Other
- *(multibinary)* mark the Clippy lint against manually implementing `Default` for `Command` as allowed
- *(multibinary)* add `cfg-if` and `snafu` as dependencies
## [0.0.13](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-v0.0.12...ac-qu-ai-nt-v0.0.13) - 2024-10-15
### Other
- build out the infrastructure for commands to be passed to the clap CLI
## [0.0.12](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-v0.0.11...ac-qu-ai-nt-v0.0.12) - 2024-10-07
### Other

View File

@@ -1,7 +1,7 @@
[package]
name = "ac-qu-ai-nt"
description = "A WIP project using AI to break down a user's query, acquire the knowledge to answer it, then transfer those insights to the user"
version = "0.0.12"
version = "0.0.14"
edition = "2021"
rust-version = "1.76"
@@ -27,11 +27,13 @@ tracing = [
]
[dependencies]
ac-qu-ai-nt-cli-clap = { version = "0.0.8", path = "../cli-clap", optional = true }
ac-qu-ai-nt-gui-eframe = { version = "0.0.5", path = "../gui-eframe", optional = true }
ac-qu-ai-nt-tui-ratatui = { version = "0.0.5", path = "../tui-ratatui", optional = true }
ac-qu-ai-nt-cli-clap = { version = "0.0.9", path = "../cli-clap", optional = true }
ac-qu-ai-nt-gui-eframe = { version = "0.0.6", path = "../gui-eframe", optional = true }
ac-qu-ai-nt-tui-ratatui = { version = "0.0.6", path = "../tui-ratatui", optional = true }
cfg-if = "1.0.0"
clap = { workspace = true, features = ["derive", "env"] }
dirs-next = "2.0.0"
snafu = { workspace = true }
tracing-subscriber = { version = "0.3.18", optional = true }

View File

@@ -1,6 +1,12 @@
use std::{fs::create_dir_all, io::ErrorKind, path::PathBuf};
use std::{
fs::create_dir_all,
io::ErrorKind,
path::{Path, PathBuf},
};
use cfg_if::cfg_if;
use clap::{Parser, Subcommand};
use snafu::{ResultExt, Snafu};
#[derive(Debug, Parser)]
struct Args {
@@ -11,24 +17,93 @@ struct Args {
)]
application_data_directory: PathBuf,
// If there is a GUI or TUI available from this binary,
// then calling this program without arguments
// is acceptable: it will launch a user interface
#[cfg(any(feature = "gui-eframe", feature = "tui-ratatui"))]
#[command(subcommand)]
command: Option<Command>,
#[cfg(not(any(feature = "gui-eframe", feature = "tui-ratatui")))]
#[command(subcommand)]
command: Command,
}
#[derive(Debug, Subcommand)]
enum Command {
#[cfg(feature = "cli-clap")]
#[command(alias = "cli")]
CliClap,
#[cfg(feature = "gui-eframe")]
#[command(alias = "gui")]
GuiEframe,
#[cfg(feature = "tui-ratatui")]
#[command(alias = "tui")]
TuiRatatui,
#[cfg(feature = "cli-clap")]
#[command(alias = "cli")]
CliClap(ac_qu_ai_nt_cli_clap::Args),
}
fn main() {
// When this program is run without arguments,
// it will launch a user interface
cfg_if!(
// with the GUI (made with eframe)
// being considered more appealing (made the default)
if #[cfg(feature = "gui-eframe")] {
#[allow(clippy::derivable_impls)]
impl Default for Command {
fn default() -> Self {
Command::GuiEframe
}
}
}
// than the TUI (made with Ratatui)
else if #[cfg(feature = "tui-ratatui")] {
#[allow(clippy::derivable_impls)]
impl Default for Command {
fn default() -> Self {
Command::TuiRatatui
}
}
}
// with it not being logical to specify
// the CLI (made with clap)
// as an option,
// because if `ac-qu-ai-nt ask "why is the sky blue?"`
// were accepted and worked when `cli-clap` was the only
// interface enabled, then when another interface
// like `gui-eframe` were enabled, it would stop working
// (only able to work as `ac-qu-ai-nt cli-clap ask "why is the sky blue?"`)
// so it should be required to do it the way that would work
// in both cases from the beginning
);
#[derive(Debug, Snafu)]
enum ApplicationError {
#[snafu(display("failed to create the {path:?} directory"))]
DirectoryCreationError {
path: PathBuf,
source: std::io::Error,
},
}
/// Create the directory and its parents,
/// but don't return an error if it already exists and is a directory
fn create_dir_all_exist_ok(path: impl AsRef<Path>) -> Result<(), std::io::Error> {
match create_dir_all(&path) {
Ok(()) => Ok(()),
Err(e) => {
if e.kind() == ErrorKind::AlreadyExists && path.as_ref().is_dir() {
Ok(())
} else {
Err(e)
}
}
}
}
#[snafu::report]
fn main() -> Result<(), ApplicationError> {
let Args {
application_data_directory,
command,
@@ -37,30 +112,28 @@ fn main() {
#[cfg(feature = "tracing")]
tracing_subscriber::fmt::init();
match create_dir_all(&application_data_directory) {
Ok(()) => {}
Err(e) if e.kind() == ErrorKind::AlreadyExists => {}
Err(e) => {
panic!("{}", e);
create_dir_all_exist_ok(&application_data_directory).with_context(|_| {
DirectoryCreationSnafu {
path: application_data_directory.clone(),
}
}
})?;
let tracing_directory = application_data_directory.join("logs");
create_dir_all_exist_ok(&tracing_directory).with_context(|_| DirectoryCreationSnafu {
path: tracing_directory.clone(),
})?;
match create_dir_all(&tracing_directory) {
Ok(()) => {}
Err(e) if e.kind() == ErrorKind::AlreadyExists => {}
Err(e) => {
panic!("{}", e);
}
}
#[cfg(any(feature = "gui-eframe", feature = "tui-ratatui"))]
let command = command.unwrap_or_default();
match command {
#[cfg(feature = "cli-clap")]
Command::CliClap => ac_qu_ai_nt_cli_clap::main(),
Command::CliClap(args) => ac_qu_ai_nt_cli_clap::main(args),
#[cfg(feature = "gui-eframe")]
Command::GuiEframe => ac_qu_ai_nt_gui_eframe::main(),
#[cfg(feature = "tui-ratatui")]
Command::TuiRatatui => ac_qu_ai_nt_tui_ratatui::main(),
}
Ok(())
}

View File

@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.0.6](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-tui-ratatui-v0.0.5...ac-qu-ai-nt-tui-ratatui-v0.0.6) - 2024-10-15
### Fixed
- *(ac-qu-ai-nt-tui-ratatui)* write a `main` function instead of re-exporting so that the declared MSRV can be met
## [0.0.5](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-tui-ratatui-v0.0.4...ac-qu-ai-nt-tui-ratatui-v0.0.5) - 2024-10-07
### Other

View File

@@ -1,7 +1,7 @@
[package]
name = "ac-qu-ai-nt-tui-ratatui"
description = "A TUI (written with Ratatui) for ac-qu-ai-nt"
version = "0.0.5"
version = "0.0.6"
edition = "2021"
rust-version = "1.76"

View File

@@ -1 +1,3 @@
use ac_qu_ai_nt_tui_ratatui::main;
fn main() {
ac_qu_ai_nt_tui_ratatui::main();
}