Repository navigation
Expand file tree
/
Copy pathdist-workspace.toml
More file actions
59 lines (55 loc) · 3.9 KB
/
Copy pathdist-workspace.toml
File metadata and controls
59 lines (55 loc) · 3.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
[workspace]
members = ["cargo:."]
# Config for 'dist'
[dist]
# The preferred dist version to use in CI (Cargo.toml SemVer syntax)
cargo-dist-version = "0.33.0"
# CI backends to support
ci = "github"
# Don't run the release workflow on pull requests. The default ("plan") runs `dist plan` on every
# PR, which also emits a skipped `build-local-artifacts` matrix job whose name can't be expanded for
# a skipped job — so the checks list shows the raw `${{ join(matrix.targets, ', ') }}` template.
# "skip" drops the PR trigger entirely; the release path (version tags) is unaffected.
pr-run-mode = "skip"
# The installers to generate for each app. `npm` produces an npm package that fetches the
# prebuilt binary from the GitHub release — so `npx @rag-rat/bin` works with no Rust toolchain.
installers = ["shell", "powershell", "npm"]
# Publish the npm installer as `@rag-rat/bin` (alongside @rag-rat/skills, @rag-rat/setup).
npm-scope = "@rag-rat"
npm-package = "bin"
# npm publish is handled by .github/workflows/release-npm.yml, NOT cargo-dist. That workflow downloads
# this generated package, injects aarch64-linux-android support (which cargo-dist can't build or
# describe — `dist plan --target aarch64-linux-android` skips every installer), and publishes the
# result as the SOLE publisher of `@rag-rat/bin` (release-android.yml builds + attaches the android
# archive that release-npm.yml waits for). Leaving cargo-dist's own npm publisher on would republish
# the android-less package under the same version (a collision). `npm` stays in `installers` above so
# cargo-dist still ATTACHES the package (rag-rat-npm-package.tar.gz) to the release for release-npm.yml
# to download + patch; the `NPM_TOKEN` repo secret (publish rights to the @rag-rat org) is read there.
publish-jobs = []
# Target platforms to build apps for (Rust target-triple syntax).
# NOTE: x86_64-apple-darwin (Intel Mac) is intentionally absent — `ort` ships no prebuilt ONNX
# Runtime for that target (ort-sys build/download/dist.txt lists aarch64- but not x86_64-apple-darwin),
# so the only way to build it is compiling ONNX from source. Apple Silicon (aarch64) is covered.
# Bare `cargo install rag-rat` does NOT work on Intel Mac either — the default features enable
# fastembed → ort and hit the same missing target. Intel Mac's only source path is the pure-Rust
# embedder: `cargo install rag-rat --no-default-features --features model2vec` (drops the ONNX/E5
# fastembed backend, keeps model2vec).
targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"]
# Link the Windows CRT dynamically (default is static/+crt-static). The prebuilt ONNX Runtime that
# `ort` downloads is built against the dynamic CRT (/MD); static linking left its stdio imports
# (__imp_tolower, __imp__wsopen_s, __imp_fgetc, …) unresolved → LNK2019. Dynamic CRT matches it.
# This flips only Rust's own objects; esaxx-rs (C++) still hardcodes /MT, so github-build-setup below
# additionally forces CFLAGS/CXXFLAGS=/MD on Windows to avoid an LNK2038 CRT mismatch.
msvc-crt-static = false
# Steps injected into the build job before `dist build`. Used for the Windows /MD CRT alignment that
# msvc-crt-static alone can't do (esaxx-rs hardcodes /MT); see the file's comment. Path is relative
# to `.github/workflows/`.
github-build-setup = "dist-build-setup/steps.yml"
# Build the Linux targets on glibc-2.39 images instead of dist's default ubuntu-22.04 (glibc 2.35).
# The prebuilt ONNX Runtime references the C23 strtol family (__isoc23_strtoll/strtoull/strtol),
# added in glibc 2.38 — on 2.35 they're undefined at link time. The resulting binaries then require
# glibc ≥2.38 at runtime, which they already did (they statically embed a glibc-2.38 ONNX build).
# aarch64 builds natively on an arm runner rather than cross-compiling.
[dist.github-custom-runners]
x86_64-unknown-linux-gnu = "ubuntu-24.04"
aarch64-unknown-linux-gnu = "ubuntu-24.04-arm"