Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions .github/workflows/build-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Platform Build Strategy:
# - Linux standard: Uses native Ubuntu 22.04 runners to keep glibc compatibility with Ubuntu 22.04 LTS
# - Linux Vulkan: Uses native Ubuntu 24.04 runners for newer Vulkan headers/tooling
# - Linux musl: Uses native Ubuntu 22.04 runners with reduced features for musl compatibility
# - macOS: Uses native macOS runners for each architecture
# - Windows: Uses Windows runner with native MSVC build
on:
Expand Down Expand Up @@ -42,6 +43,16 @@ jobs:
target-suffix: unknown-linux-gnu
build-on: ubuntu-22.04-arm
variant: standard
- platform: linux
architecture: x86_64
target-suffix: unknown-linux-musl
build-on: ubuntu-22.04
variant: musl
- platform: linux
architecture: aarch64
target-suffix: unknown-linux-musl
build-on: ubuntu-22.04-arm
variant: musl
- platform: linux
architecture: x86_64
target-suffix: unknown-linux-gnu
Expand Down Expand Up @@ -104,6 +115,10 @@ jobs:
glslc
fi

if [ "${{ matrix.variant }}" = "musl" ]; then
sudo apt-get install -y musl-tools
fi

- name: Cache Cargo artifacts (Linux/macOS)
if: matrix.platform != 'windows'
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
Expand Down Expand Up @@ -133,7 +148,14 @@ jobs:
if [ "${{ matrix.variant }}" = "vulkan" ]; then
FEATURE_ARGS=(--features vulkan)
fi
cargo build --release --target ${TARGET} -p goose-cli "${FEATURE_ARGS[@]}"

if [ "${{ matrix.variant }}" = "musl" ]; then
cargo build --release --target ${TARGET} -p goose-cli --bin goose \
--no-default-features \
--features portable-default
else
cargo build --release --target ${TARGET} -p goose-cli "${FEATURE_ARGS[@]}"
fi

- name: Setup Rust (Windows)
if: matrix.platform == 'windows'
Expand Down Expand Up @@ -233,7 +255,7 @@ jobs:
- name: Upload CLI artifact
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: goose-${{ matrix.architecture }}-${{ matrix.target-suffix }}${{ matrix.variant != 'standard' && format('-{0}', matrix.variant) || '' }}
name: goose-${{ matrix.architecture }}-${{ matrix.target-suffix }}${{ matrix.variant != 'standard' && matrix.variant != 'musl' && format('-{0}', matrix.variant) || '' }}
path: |
${{ env.ARTIFACT_BZ2 }}
${{ env.ARTIFACT_GZ }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr-comment-build-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ jobs:
Download CLI builds for different platforms:
- [📦 Linux (x86_64, Ubuntu 22.04-compatible)](https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/goose-x86_64-unknown-linux-gnu.zip)
- [📦 Linux (aarch64, Ubuntu 22.04-compatible)](https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/goose-aarch64-unknown-linux-gnu.zip)
- [📦 Linux musl (x86_64)](https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/goose-x86_64-unknown-linux-musl.zip)
- [📦 Linux musl (aarch64)](https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/goose-aarch64-unknown-linux-musl.zip)
- [📦 Linux Vulkan (x86_64, Ubuntu 24.04+)](https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/goose-x86_64-unknown-linux-gnu-vulkan.zip)
- [📦 Linux Vulkan (aarch64, Ubuntu 24.04+)](https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/goose-aarch64-unknown-linux-gnu-vulkan.zip)
- [📦 macOS (x86_64)](https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/goose-x86_64-apple-darwin.zip)
Expand Down
12 changes: 11 additions & 1 deletion crates/goose-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,24 @@ clap_complete_nushell = "4.6.0"
winapi = { workspace = true }

[features]
default = ["code-mode", "local-inference", "aws-providers", "telemetry", "otel", "rustls-tls"]
default = [
"code-mode",
"local-inference",
"aws-providers",
"telemetry",
"otel",
"rustls-tls",
"system-keyring",
]
code-mode = ["goose/code-mode"]
local-inference = ["goose/local-inference"]
aws-providers = ["goose/aws-providers"]
cuda = ["goose/cuda", "local-inference"]
vulkan = ["goose/vulkan", "local-inference"]
telemetry = ["goose/telemetry"]
otel = ["goose/otel"]
system-keyring = ["goose/system-keyring"]
portable-default = ["rustls-tls", "aws-providers", "telemetry", "otel"]
# disables the update command
disable-update = []
rustls-tls = [
Expand Down
12 changes: 10 additions & 2 deletions crates/goose-cli/src/commands/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,22 @@ fn asset_name() -> &'static str {
{
"goose-x86_64-apple-darwin.tar.bz2"
}
#[cfg(all(target_os = "linux", target_arch = "x86_64"))]
#[cfg(all(target_os = "linux", target_arch = "x86_64", target_env = "gnu"))]
{
"goose-x86_64-unknown-linux-gnu.tar.bz2"
}
#[cfg(all(target_os = "linux", target_arch = "aarch64"))]
#[cfg(all(target_os = "linux", target_arch = "aarch64", target_env = "gnu"))]
{
"goose-aarch64-unknown-linux-gnu.tar.bz2"
}
#[cfg(all(target_os = "linux", target_arch = "x86_64", target_env = "musl"))]
{
"goose-x86_64-unknown-linux-musl.tar.bz2"
}
#[cfg(all(target_os = "linux", target_arch = "aarch64", target_env = "musl"))]
{
"goose-aarch64-unknown-linux-musl.tar.bz2"
}
#[cfg(all(target_os = "windows", target_arch = "x86_64", feature = "cuda"))]
{
"goose-x86_64-pc-windows-msvc-cuda.zip"
Expand Down
12 changes: 11 additions & 1 deletion crates/goose-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,24 @@ description.workspace = true
workspace = true

[features]
default = ["code-mode", "local-inference", "aws-providers", "telemetry", "otel", "rustls-tls"]
default = [
"code-mode",
"local-inference",
"aws-providers",
"telemetry",
"otel",
"rustls-tls",
"system-keyring",
]
code-mode = ["goose/code-mode"]
local-inference = ["goose/local-inference"]
aws-providers = ["goose/aws-providers"]
cuda = ["goose/cuda", "local-inference"]
vulkan = ["goose/vulkan", "local-inference"]
telemetry = ["goose/telemetry"]
otel = ["goose/otel"]
system-keyring = ["goose/system-keyring"]
portable-default = ["rustls-tls", "aws-providers", "telemetry", "otel"]
rustls-tls = [
"reqwest/rustls",
"tokio-tungstenite/rustls-tls-native-roots",
Expand Down
20 changes: 15 additions & 5 deletions crates/goose/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@ repository.workspace = true
description.workspace = true

[features]
default = ["code-mode", "local-inference", "aws-providers", "telemetry", "otel", "rustls-tls"]
default = [
"code-mode",
"local-inference",
"aws-providers",
"telemetry",
"otel",
"rustls-tls",
"system-keyring",
]
telemetry = []
otel = [
"dep:tracing-opentelemetry",
Expand Down Expand Up @@ -59,6 +67,8 @@ native-tls = [
"oauth2/reqwest",
"oauth2/native-tls",
]
system-keyring = ["dep:keyring"]
portable-default = ["rustls-tls", "aws-providers", "telemetry", "otel"]


[lints]
Expand Down Expand Up @@ -110,7 +120,7 @@ opentelemetry_sdk = { workspace = true, optional = true }
opentelemetry-appender-tracing = { workspace = true, optional = true }
opentelemetry-otlp = { workspace = true, optional = true }
opentelemetry-stdout = { workspace = true, optional = true }
keyring = { version = "3.6.2", features = ["vendored"] }
keyring = { version = "3.6.2", features = ["vendored"], optional = true }
serde_yaml = { workspace = true }
strum = { workspace = true }
once_cell = { workspace = true }
Expand Down Expand Up @@ -203,17 +213,17 @@ rustls = { version = "0.23", features = ["aws_lc_rs"], optional = true }

[target.'cfg(target_os = "windows")'.dependencies]
winapi = { workspace = true }
keyring = { version = "3.6.2", features = ["windows-native"] }
keyring = { version = "3.6.2", features = ["windows-native"], optional = true }

# Platform-specific GPU acceleration for Whisper and local inference
[target.'cfg(target_os = "macos")'.dependencies]
candle-core = { version = "0.10.2", default-features = false, features = ["metal"], optional = true }
candle-nn = { version = "0.10.2", default-features = false, features = ["metal"], optional = true }
llama-cpp-2 = { version = "0.1.145", features = ["sampler", "metal", "mtmd"], optional = true }
keyring = { version = "3.6.2", features = ["apple-native"] }
keyring = { version = "3.6.2", features = ["apple-native"], optional = true }

[target.'cfg(target_os = "linux")'.dependencies]
keyring = { version = "3.6.2", features = ["sync-secret-service"] }
keyring = { version = "3.6.2", features = ["sync-secret-service"], optional = true }
libc = "0.2.186"

[dev-dependencies]
Expand Down
Loading
Loading