mirror of
https://github.com/babichjacob/ac-qu-ai-nt.git
synced 2025-10-02 04:47:53 -04:00
Compare commits
64 Commits
release-pl
...
ac-qu-ai-n
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1175fa22d6 | ||
![]() |
13b7053386 | ||
![]() |
972129536f | ||
![]() |
ae7de503a4 | ||
![]() |
21df8d1781 | ||
![]() |
e5707cb106 | ||
![]() |
7f450568f2 | ||
![]() |
e2bf39e2c1 | ||
![]() |
e96081486a | ||
![]() |
63ffbf9f1a | ||
![]() |
65bdf6dd04 | ||
![]() |
43682dc3d3 | ||
![]() |
c25e628aa9 | ||
![]() |
1177376450 | ||
![]() |
f37d56edba | ||
![]() |
1854dc429c | ||
![]() |
3e69d65bcc | ||
![]() |
4c04f21dcb | ||
![]() |
c0ec64f06c | ||
![]() |
70e20e2e04 | ||
![]() |
12107daf6b | ||
![]() |
839f219469 | ||
![]() |
56ad1de3d4 | ||
![]() |
30dee5efa7 | ||
![]() |
52297c7b43 | ||
![]() |
b1520ae76b | ||
![]() |
ac42b4861c | ||
![]() |
499562853c | ||
![]() |
d6922c30c5 | ||
![]() |
b5935b8ab5 | ||
![]() |
5e0a2326ca | ||
![]() |
1493425540 | ||
![]() |
576a8e99c0 | ||
![]() |
01ce1e85a8 | ||
![]() |
cd788e1ab8 | ||
![]() |
65487b2378 | ||
![]() |
e4e2efafb9 | ||
![]() |
0fcdfdae30 | ||
![]() |
9e43655567 | ||
![]() |
0bc9424db6 | ||
![]() |
4a13d61e25 | ||
![]() |
376893e566 | ||
![]() |
c8cde7dffc | ||
![]() |
6f9b8e42e1 | ||
![]() |
59d976664f | ||
![]() |
95541183ef | ||
![]() |
b5e11f2c7f | ||
![]() |
b2dfa6f8f1 | ||
![]() |
75952c947a | ||
![]() |
15c8a69cf3 | ||
![]() |
2e764e0d24 | ||
![]() |
a0a52489e5 | ||
![]() |
1b636bcf7c | ||
![]() |
08d4e1b94c | ||
![]() |
bee8d9a21e | ||
![]() |
44fcea467a | ||
![]() |
69fc7865db | ||
![]() |
19efe3c6e3 | ||
![]() |
a41995bcbd | ||
![]() |
e29442d973 | ||
![]() |
e84af2ec17 | ||
![]() |
c156157a59 | ||
![]() |
40dc6916b6 | ||
![]() |
67bdde027e |
181
.github/workflows/check-and-build-and-test.yml
vendored
Normal file
181
.github/workflows/check-and-build-and-test.yml
vendored
Normal file
@@ -0,0 +1,181 @@
|
||||
name: Check, build, and test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
# This workflow is definitely expensive for GitHub,
|
||||
# so let's not let files that won't affect the project's ability to build and test trigger it
|
||||
paths-ignore:
|
||||
- ".github/**"
|
||||
- "**/.gitignore"
|
||||
- "**/CHANGELOG.md"
|
||||
- "**/README.md"
|
||||
- "**/LICENSE-*"
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
formatting:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 2
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install stable Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Formatting
|
||||
run: cargo fmt --check --verbose
|
||||
|
||||
check-and-build:
|
||||
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 gcc-aarch64-linux-gnu
|
||||
runner: ubuntu-latest
|
||||
target: aarch64-unknown-linux-gnu
|
||||
|
||||
- install_prerequisite: sudo apt-get update && sudo apt-get install gcc-aarch64-linux-gnu
|
||||
runner: ubuntu-latest
|
||||
target: aarch64-unknown-linux-musl
|
||||
|
||||
- runner: ubuntu-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
|
||||
- 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
|
||||
|
||||
- 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 }} (on ${{ matrix.supporteds.runner }})
|
||||
runs-on: ${{ matrix.supporteds.runner }}
|
||||
timeout-minutes: 5
|
||||
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 stable Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: ${{ matrix.supporteds.target }}
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: ${{ matrix.supporteds.target }}
|
||||
cache-on-failure: "true"
|
||||
|
||||
- name: Check
|
||||
run: cargo check --verbose --target ${{ matrix.supporteds.target }}
|
||||
|
||||
- name: Build
|
||||
run: cargo build --verbose --target ${{ matrix.supporteds.target }}
|
||||
|
||||
test:
|
||||
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
|
||||
|
||||
- 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
|
||||
|
||||
- runner: windows-latest
|
||||
target: x86_64-pc-windows-gnu
|
||||
|
||||
- runner: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
name: Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }})
|
||||
runs-on: ${{ matrix.supporteds.runner }}
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install stable Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: ${{ matrix.supporteds.target }}
|
||||
|
||||
- name: Install Nextest
|
||||
uses: taiki-e/install-action@cargo-nextest
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Test
|
||||
run: cargo nextest run --target ${{ matrix.supporteds.target }}
|
||||
|
||||
minimal-dependencies-check-build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Install cargo-minimal-versions
|
||||
uses: taiki-e/install-action@cargo-hack
|
||||
- name: Install cargo-minimal-versions
|
||||
uses: taiki-e/install-action@cargo-minimal-versions
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Check (minimal direct dependencies)
|
||||
run: cargo minimal-versions check --direct --workspace
|
||||
|
||||
- name: Build (minimal direct dependencies)
|
||||
run: cargo minimal-versions build --direct --workspace
|
||||
|
||||
- name: Test (minimal direct dependencies)
|
||||
run: cargo minimal-versions test --direct --workspace
|
77
.github/workflows/compile-and-publish-binaries-to-release.yml
vendored
Normal file
77
.github/workflows/compile-and-publish-binaries-to-release.yml
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
name: Compile and publish binaries whenever a new release is cut
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
compile-and-publish:
|
||||
if: ${{ startsWith(github.event.release.tag_name, format('{0}-v', matrix.crate)) }}
|
||||
strategy:
|
||||
matrix:
|
||||
crate:
|
||||
- ac-qu-ai-nt
|
||||
- ac-qu-ai-nt-cli-clap
|
||||
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 gcc-aarch64-linux-gnu
|
||||
runner: ubuntu-latest
|
||||
target: aarch64-unknown-linux-gnu
|
||||
|
||||
- install_prerequisite: sudo apt-get update && sudo apt-get install gcc-aarch64-linux-gnu
|
||||
runner: ubuntu-latest
|
||||
target: aarch64-unknown-linux-musl
|
||||
|
||||
- runner: ubuntu-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
|
||||
- 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
|
||||
|
||||
- runner: windows-latest
|
||||
target: x86_64-pc-windows-gnu
|
||||
|
||||
- runner: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
name: Compile ${{ matrix.supporteds.target }} for release (on ${{ matrix.supporteds.runner }})
|
||||
runs-on: ${{ matrix.supporteds.runner }}
|
||||
timeout-minutes: 10
|
||||
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 Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: ${{ matrix.supporteds.target }}
|
||||
cache-on-failure: "true"
|
||||
|
||||
- name: Build for release
|
||||
run: cargo build --release --verbose
|
||||
|
||||
- uses: taiki-e/upload-rust-binary-action@v1
|
||||
with:
|
||||
bin: ${{ matrix.crate }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
target: ${{ matrix.supporteds.target }}
|
9
.github/workflows/release-plz.yml
vendored
9
.github/workflows/release-plz.yml
vendored
@@ -14,14 +14,21 @@ jobs:
|
||||
name: Release-plz
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Generate GitHub token
|
||||
uses: actions/create-github-app-token@v1
|
||||
id: generate-token
|
||||
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
|
||||
- name: Run release-plz
|
||||
uses: MarcoIeni/release-plz-action@v0.5
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||
|
264
Cargo.lock
generated
264
Cargo.lock
generated
@@ -4,16 +4,20 @@ version = 3
|
||||
|
||||
[[package]]
|
||||
name = "ac-qu-ai-nt"
|
||||
version = "0.0.1"
|
||||
version = "0.0.7"
|
||||
dependencies = [
|
||||
"ac-qu-ai-nt-cli-clap",
|
||||
"clap",
|
||||
"dirs-next",
|
||||
"tracing-subscriber",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ac-qu-ai-nt-cli-clap"
|
||||
version = "0.0.1"
|
||||
version = "0.0.5"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -65,6 +69,18 @@ dependencies = [
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "2.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.5.18"
|
||||
@@ -111,6 +127,38 @@ version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
|
||||
|
||||
[[package]]
|
||||
name = "dirs-next"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"dirs-sys-next",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dirs-sys-next"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"redox_users",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[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 = "heck"
|
||||
version = "0.5.0"
|
||||
@@ -123,6 +171,71 @@ version = "1.70.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.159"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5"
|
||||
|
||||
[[package]]
|
||||
name = "libredox"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.22"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
|
||||
|
||||
[[package]]
|
||||
name = "nu-ansi-term"
|
||||
version = "0.46.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
|
||||
dependencies = [
|
||||
"overload",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.20.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1"
|
||||
dependencies = [
|
||||
"portable-atomic",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "overload"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-lite"
|
||||
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 = "proc-macro2"
|
||||
version = "1.0.86"
|
||||
@@ -141,6 +254,32 @@ dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_users"
|
||||
version = "0.4.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
|
||||
dependencies = [
|
||||
"getrandom",
|
||||
"libredox",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sharded-slab"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "1.13.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
|
||||
|
||||
[[package]]
|
||||
name = "strsim"
|
||||
version = "0.11.1"
|
||||
@@ -158,6 +297,93 @@ dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "1.0.64"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84"
|
||||
dependencies = [
|
||||
"thiserror-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "1.0.64"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thread_local"
|
||||
version = "1.1.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing"
|
||||
version = "0.1.40"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
|
||||
dependencies = [
|
||||
"pin-project-lite",
|
||||
"tracing-attributes",
|
||||
"tracing-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-attributes"
|
||||
version = "0.1.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-core"
|
||||
version = "0.1.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"valuable",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-log"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
|
||||
dependencies = [
|
||||
"log",
|
||||
"once_cell",
|
||||
"tracing-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-subscriber"
|
||||
version = "0.3.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b"
|
||||
dependencies = [
|
||||
"nu-ansi-term",
|
||||
"sharded-slab",
|
||||
"smallvec",
|
||||
"thread_local",
|
||||
"tracing-core",
|
||||
"tracing-log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.13"
|
||||
@@ -170,6 +396,40 @@ version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
||||
|
||||
[[package]]
|
||||
name = "valuable"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.11.0+wasi-snapshot-preview1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
||||
dependencies = [
|
||||
"winapi-i686-pc-windows-gnu",
|
||||
"winapi-x86_64-pc-windows-gnu",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-i686-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
|
||||
[[package]]
|
||||
name = "winapi-x86_64-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.52.0"
|
||||
|
@@ -4,8 +4,9 @@ resolver = "2"
|
||||
|
||||
[workspace.package]
|
||||
authors = ["J / Jacob Babich <jacobbabichpublic+git@gmail.com>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
license = "Apache-2.0 OR MIT OR Unlicense"
|
||||
repository = "https://github.com/babichjacob/ac-qu-ai-nt"
|
||||
|
||||
[workspace.dependencies]
|
||||
clap = "4"
|
||||
tracing = "0.1"
|
||||
|
24
LICENSE-UNLICENSE
Normal file
24
LICENSE-UNLICENSE
Normal file
@@ -0,0 +1,24 @@
|
||||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
For more information, please refer to <http://unlicense.org/>
|
79
README.md
79
README.md
@@ -1,4 +1,81 @@
|
||||
# ac-qu-ai-nt
|
||||
`ac-qu-ai-nt` is a project I'm working on, using artificial intelligence to break down the user's query, acquire knowledge, and transfer insights to the user('s mind).
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
```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:
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
core --> cli-clap
|
||||
core --> gui-eframe
|
||||
core --> tui-ratatui
|
||||
cli-clap --> multibinary
|
||||
gui-eframe --> multibinary
|
||||
tui-ratatui --> multibinary
|
||||
```
|
||||
|
||||
## 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/).
|
||||
|
||||
To be more specific about what a breaking change _could_ entail:
|
||||
|
||||
- a previously successful compilation now failing
|
||||
- the program (wrongly) exiting, panicking, reporting an error, etc, where it didn't previously
|
||||
- changing the expected result of an existing integration test (not sure if unit tests would count)
|
||||
|
||||
All the crates in this project have a [minimum supported Rust version (MSRV)](https://rust-lang.github.io/rfcs/2495-min-rust-version.html) of 1.76, the release succeeding [the one that stabilized `async fn` in traits](https://blog.rust-lang.org/2023/12/28/Rust-1.75.0.html) (which the `core` crate of this project is expected to make use of). I [intend to test this in CI (GitHub Actions) in the future](https://github.com/babichjacob/ac-qu-ai-nt/issues/5) to identify if it ever gets raised by changes but I have not set this up yet. Raising the MSRV will be considered a breaking change --- my justification is that it [seems more appropriate for an application like this](https://github.com/matklad/once_cell/issues/201#issuecomment-1257213601). This may be reconsidered if [Cargo's MSRV-aware resolver](https://rust-lang.github.io/rfcs/3537-msrv-resolver.html) is stabilized.
|
||||
|
||||
## 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)
|
||||
|
||||
at your option.
|
||||
|
@@ -7,6 +7,34 @@ 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-cli-clap-v0.0.4...ac-qu-ai-nt-cli-clap-v0.0.5) - 2024-10-05
|
||||
|
||||
### Other
|
||||
|
||||
- change `Hello, world!` to `What's up world?` to allow me to cut a release
|
||||
|
||||
## [0.0.4](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-cli-clap-v0.0.3...ac-qu-ai-nt-cli-clap-v0.0.4) - 2024-09-30
|
||||
|
||||
### Added
|
||||
|
||||
- make `tracing` a crate feature and make it a default feature of the current crates
|
||||
|
||||
### Other
|
||||
|
||||
- *(cli-clap)* or at least I hope chore is the right conventional commit type to use - switch `println!` to a `tracing` invocation (to verify that the tracing infrastructure works)
|
||||
|
||||
## [0.0.3](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-cli-clap-v0.0.2...ac-qu-ai-nt-cli-clap-v0.0.3) - 2024-09-30
|
||||
|
||||
### Other
|
||||
|
||||
- add `tracing` and `tracing-subscriber` as dependencies
|
||||
|
||||
## [0.0.2](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-cli-clap-v0.0.1...ac-qu-ai-nt-cli-clap-v0.0.2) - 2024-09-25
|
||||
|
||||
### Other
|
||||
|
||||
- release
|
||||
|
||||
## [0.0.1](https://github.com/babichjacob/ac-qu-ai-nt/releases/tag/ac-qu-ai-nt-cli-clap-v0.0.1) - 2024-09-24
|
||||
|
||||
### Other
|
||||
|
@@ -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.1"
|
||||
version = "0.0.5"
|
||||
edition = "2021"
|
||||
rust-version = "1.76"
|
||||
|
||||
@@ -9,5 +9,10 @@ authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
repository = { workspace = true }
|
||||
|
||||
[features]
|
||||
default = ["tracing"]
|
||||
tracing = ["dep:tracing"]
|
||||
|
||||
[dependencies]
|
||||
clap = { workspace = true, features = ["derive", "env"] }
|
||||
tracing = { workspace = true, optional = true }
|
||||
|
@@ -1,3 +1,4 @@
|
||||
pub fn main() {
|
||||
println!("Hello, world!");
|
||||
#[cfg(feature = "tracing")]
|
||||
tracing::info!("What's up, world?");
|
||||
}
|
||||
|
@@ -7,6 +7,54 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.0.7](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-v0.0.6...ac-qu-ai-nt-v0.0.7) - 2024-10-05
|
||||
|
||||
### Other
|
||||
|
||||
- updated the following local packages: ac-qu-ai-nt-cli-clap
|
||||
|
||||
## [0.0.6](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-v0.0.5...ac-qu-ai-nt-v0.0.6) - 2024-10-05
|
||||
|
||||
### Fixed
|
||||
|
||||
- cover the new cases of `Command` for `GuiEframe` and `TuiRatatui`
|
||||
|
||||
### Other
|
||||
|
||||
- correctly add `gui-eframe` and `tui-ratatui` as features this time around
|
||||
- add `gui-eframe` and `tui-ratatui` as subcommands with aliases `gui` and `tui` respectively
|
||||
- add `gui-eframe` and `tui-ratatui` as features
|
||||
|
||||
## [0.0.5](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-v0.0.4...ac-qu-ai-nt-v0.0.5) - 2024-10-05
|
||||
|
||||
### Other
|
||||
|
||||
- [**breaking**] put accessing the cli under a subcommand like the README suggests it would be
|
||||
|
||||
## [0.0.4](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-v0.0.3...ac-qu-ai-nt-v0.0.4) - 2024-09-30
|
||||
|
||||
### Added
|
||||
|
||||
- *(multibinary)* initialize a basic tracing subscriber until this is changed to a directory one using `tracing-appender` at a later time
|
||||
- make `tracing` a crate feature and make it a default feature of the current crates
|
||||
|
||||
## [0.0.3](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-v0.0.2...ac-qu-ai-nt-v0.0.3) - 2024-09-30
|
||||
|
||||
### Added
|
||||
|
||||
- [**breaking**] this is the correct way to format a breaking change unlike my previous commit - ensure the application data directory, and the tracing directory within it, exists
|
||||
|
||||
### Other
|
||||
|
||||
- add `tracing` and `tracing-subscriber` as dependencies
|
||||
- reserve a data directory for the application
|
||||
|
||||
## [0.0.2](https://github.com/babichjacob/ac-qu-ai-nt/compare/ac-qu-ai-nt-v0.0.1...ac-qu-ai-nt-v0.0.2) - 2024-09-25
|
||||
|
||||
### Other
|
||||
|
||||
- release
|
||||
|
||||
## [0.0.1](https://github.com/babichjacob/ac-qu-ai-nt/releases/tag/ac-qu-ai-nt-v0.0.1) - 2024-09-24
|
||||
|
||||
### Other
|
||||
|
@@ -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.1"
|
||||
version = "0.0.7"
|
||||
edition = "2021"
|
||||
rust-version = "1.76"
|
||||
|
||||
@@ -10,8 +10,16 @@ license = { workspace = true }
|
||||
repository = { workspace = true }
|
||||
|
||||
[features]
|
||||
default = ["cli-clap"]
|
||||
default = ["cli-clap", "gui-eframe", "tui-ratatui", "tracing"]
|
||||
|
||||
cli-clap = ["dep:ac-qu-ai-nt-cli-clap"]
|
||||
gui-eframe = []
|
||||
tui-ratatui = []
|
||||
|
||||
tracing = ["dep:tracing-subscriber", "ac-qu-ai-nt-cli-clap?/tracing"]
|
||||
|
||||
[dependencies]
|
||||
ac-qu-ai-nt-cli-clap = { version = "0.0.1", path = "../cli-clap", optional = true }
|
||||
ac-qu-ai-nt-cli-clap = { version = "0.0.5", path = "../cli-clap", optional = true }
|
||||
clap = { workspace = true, features = ["derive", "env"] }
|
||||
dirs-next = "2.0.0"
|
||||
tracing-subscriber = { version = "0.3.18", optional = true }
|
||||
|
@@ -1,4 +1,66 @@
|
||||
fn main() {
|
||||
#[cfg(feature = "cli-clap")]
|
||||
ac_qu_ai_nt_cli_clap::main();
|
||||
use std::{fs::create_dir_all, io::ErrorKind, path::PathBuf};
|
||||
|
||||
use clap::{Parser, Subcommand};
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
struct Args {
|
||||
#[arg(
|
||||
long,
|
||||
env,
|
||||
default_value_os_t = dirs_next::data_local_dir().expect("sorry but you're on a platform where dirs_next::data_local_dir() returned None, so please specify a data directory for the application").join("ac-qu-ai-nt")
|
||||
)]
|
||||
application_data_directory: PathBuf,
|
||||
|
||||
#[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,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let Args {
|
||||
application_data_directory,
|
||||
command,
|
||||
} = Args::parse();
|
||||
|
||||
#[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);
|
||||
}
|
||||
}
|
||||
|
||||
let tracing_directory = application_data_directory.join("logs");
|
||||
|
||||
match create_dir_all(&tracing_directory) {
|
||||
Ok(()) => {}
|
||||
Err(e) if e.kind() == ErrorKind::AlreadyExists => {}
|
||||
Err(e) => {
|
||||
panic!("{}", e);
|
||||
}
|
||||
}
|
||||
|
||||
match command {
|
||||
#[cfg(feature = "cli-clap")]
|
||||
Command::CliClap => ac_qu_ai_nt_cli_clap::main(),
|
||||
#[cfg(feature = "gui-eframe")]
|
||||
Command::GuiEframe => todo!(),
|
||||
#[cfg(feature = "tui-ratatui")]
|
||||
Command::TuiRatatui => todo!(),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user