src/llms/mod.rs
src/llms/gemini.rs
src/llms/claude.rs
src/traits.rs
LLMRequest
src/main.rs
Gemini
The packager.py
script automates the build and packaging process of the Rust project. It performs the following steps:
- Implements changes in the Rust project directory.
- Builds the Rust project using
cargo build --release
. - Installs
cargo-deb
if it is not already installed. - Packages the executable into a
.deb
file usingcargo deb
. - Verifies the
.deb
file usingdpkg-deb -I
. - Prints the path of the generated
.deb
file.
To run the script, execute the following command:
python3 packager.py
This command compiles the project and produces a .deb
file in the current directory. 📄
The PKGBUILD
script is tailored for building and packaging Clearch for Arch Linux. Here’s a summary of its operation:
- Defines package metadata: name (
clearch
), version (0.1.0
), architecture (x86_64
), URL, license (MIT
), and dependencies (glibc
). - Specifies build dependencies:
rust
,cargo
. - Defines the source file URL.
- Specifies the build command:
cargo build --release --locked --all-features --target-dir=target
. - Defines the package function to install the
clearch
executable, theLICENSE
file, and theREADME.md
to their respective directories in the package.
The PKGBUILD
file is as given below:
# Maintainer: Eric TK <[email protected]>
pkgname=clearch
pkgver=0.1.0
pkgrel=1
pkgdesc="A simple CLI tool written in Rust"
arch=('x86_64')
url="https://github.com/Zane-Dev14/ClearchOnlyTar"
license=('MIT')
depends=('glibc')
makedepends=('rust' 'cargo')
source=("https://github.com/Zane-Dev14/ClearchOnlyTar/raw/main/clearch-cli-0.1.0.tar.gz")
sha256sums=('SKIP')
build() {
cd "$srcdir"
cargo build --release --locked --all-features --target-dir=target
}
package() {
install -Dm755 "$srcdir/target/release/clearch" "$pkgdir/usr/bin/clearch"
install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 "$srcdir/README.md" "$pkgdir/usr/share/doc/$pkgname/README.md"
}
This script will effectively build the project and generate a package for Arch Linux. 🛠️