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
2 changes: 1 addition & 1 deletion .github/workflows/autofmt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
gh pr checkout ${{ github.event.issue.number }} --repo "$GITHUB_REPOSITORY"

- name: Install Rust (rustfmt)
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@1.86.0
with:
components: rustfmt

Expand Down
31 changes: 24 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,18 @@ jobs:
run: sudo apt-get install -y protobuf-compiler

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
# 1.86 is the MSRV (pinned via rust-toolchain.toml, see /CLAUDE.md). Plain
# `cargo` resolves to it. fmt, clippy and the library build run on 1.86 to
# guarantee the shipped crate builds there.
uses: dtolnay/rust-toolchain@1.86.0

- name: Install Rust (test toolchain)
# The experimental `adbc` feature's test path pulls `adbc_datafusion` →
# `datafusion` ≥53.1.0, which requires rustc ≥1.88. Steps that compile
# tests/dev-dependencies use this newer toolchain via `cargo +stable`.
# Installing it here does not change the default — rust-toolchain.toml
# keeps plain `cargo` on 1.86.
run: rustup toolchain install stable --profile minimal

- name: Caching
uses: Swatinem/rust-cache@v2
Expand All @@ -54,28 +65,34 @@ jobs:
run: cargo clippy -- -D warnings

- name: Install wasm-pack
run: cargo install wasm-pack
# Compile the tool itself on stable; the actual wasm build below still
# runs on the pinned 1.86 toolchain.
run: cargo +stable install wasm-pack

- name: Build with cargo
run: cargo build --all-targets
- name: Build library (MSRV 1.86)
run: cargo build

- name: Build all targets
# --all-targets compiles dev-dependencies (datafusion), so it needs ≥1.88.
run: cargo +stable build --all-targets

- name: Run tree-sitter tests
working-directory: tree-sitter-ggsql
run: tree-sitter test

- name: Run Rust tests
run: cargo test --lib --bins
run: cargo +stable test --lib --bins

- name: Install dbc CLI and SQLite ADBC driver
run: |
curl -LsSf https://dbc.columnar.tech/install.sh | sh
"$HOME/.local/bin/dbc" install sqlite

- name: Run ADBC unit tests
run: cargo test --features "adbc sqlite" --lib
run: cargo +stable test --features "adbc sqlite" --lib

- name: Run ADBC SQLite equivalence tests
run: cargo test --features "adbc sqlite" --lib -- --ignored equivalence
run: cargo +stable test --features "adbc sqlite" --lib -- --ignored equivalence

- name: Build WASM library
working-directory: ggsql-wasm/library
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,16 @@ jobs:
run: sudo apt-get install -y unixodbc-dev

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
# 1.86 is the MSRV (see /CLAUDE.md); the Jupyter kernel build below runs
# on it. Plain `cargo` resolves to 1.86 via rust-toolchain.toml.
uses: dtolnay/rust-toolchain@1.86.0

- name: Install Rust (wasm toolchain)
# The wasm build is exempt from the 1.86 pin (R doesn't use wasm); some
# wasm-only deps need a newer rustc. Installing stable here does not
# change the default — rust-toolchain.toml keeps plain `cargo` on 1.86,
# and ggsql-wasm/rust-toolchain.toml selects stable for the wasm build.
run: rustup toolchain install stable --profile minimal

- name: Caching
uses: Swatinem/rust-cache@v2
Expand All @@ -47,10 +56,12 @@ jobs:
save-if: ${{ github.ref == 'refs/heads/main' }}

- name: Install wasm-pack
run: cargo install wasm-pack
# `cargo install` runs at the repo root (pinned to 1.86); `+stable`
# builds these tools on the newer toolchain instead.
run: cargo +stable install wasm-pack

- name: Install wasm-opt
run: cargo install wasm-opt
run: cargo +stable install wasm-opt

- name: Setup quarto
uses: quarto-dev/quarto-actions/setup@v2
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/release-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: npm install -g tree-sitter-cli

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@1.86.0
with:
targets: x86_64-pc-windows-msvc

Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
run: npm install -g tree-sitter-cli

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@1.86.0
with:
targets: x86_64-apple-darwin

Expand Down Expand Up @@ -210,7 +210,7 @@ jobs:
run: npm install -g tree-sitter-cli

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@1.86.0
with:
targets: aarch64-apple-darwin

Expand Down Expand Up @@ -317,7 +317,7 @@ jobs:
run: npm install -g tree-sitter-cli

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@1.86.0
with:
targets: x86_64-unknown-linux-gnu

Expand Down Expand Up @@ -364,7 +364,7 @@ jobs:
run: npm install -g tree-sitter-cli

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@1.86.0
with:
targets: aarch64-unknown-linux-gnu

Expand Down Expand Up @@ -415,7 +415,7 @@ jobs:
run: npm install -g tree-sitter-cli

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@1.86.0

- name: Get crates.io publish token
uses: rust-lang/crates-io-auth-action@v1
Expand Down Expand Up @@ -476,16 +476,21 @@ jobs:
run: npm install -g tree-sitter-cli

- name: Install Rust toolchain
# The wasm build is exempt from the 1.86 MSRV pin (R doesn't use wasm);
# some wasm-only deps need a newer rustc. ggsql-wasm/rust-toolchain.toml
# selects stable for the actual build.
uses: dtolnay/rust-toolchain@stable

- name: Install LLVM
run: sudo apt-get install -y llvm

- name: Install wasm-pack
run: cargo install wasm-pack
# `cargo install` runs at the repo root, where rust-toolchain.toml pins
# 1.86; `+stable` builds these tools on the newer toolchain instead.
run: cargo +stable install wasm-pack

- name: Install wasm-opt
run: cargo install wasm-opt
run: cargo +stable install wasm-opt

- name: Build WASM package
run: ./ggsql-wasm/build-wasm.sh
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
- Upgraded dependencies: duckdb-rs v1.10502, arrow v58 (#447).
- Renamed the `width` setting in the `range` layer to `hinge`. This prevents
it from clashing with `width` needed by `position => 'dodge'` (#437).
- Pinned the minimum supported Rust version to 1.86 (the maximum Rust version
CRAN ships) so the crate keeps building for the R bindings.

## 0.3.3 - 2026-05-27

Expand Down
9 changes: 9 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ cd ggsql-vscode && npm install && npm run package
cd tree-sitter-ggsql && npx tree-sitter generate
```

### Rust version (MSRV)

The toolchain is **pinned to Rust 1.86** (`rust-toolchain.toml` + `rust-version` in `/Cargo.toml`). This is the maximum Rust version CRAN ships, and the R bindings must build against it — **only bump it when CRAN does.** Setting `rust-version` also turns on clippy's MSRV-aware lints, so accidental use of a newer std API fails `clippy`/build with a clear message instead of a cryptic `E0658`.

Two things are exempt from the pin:

- **The `adbc` test path.** The experimental `adbc` feature depends (dev-only) on `adbc_datafusion` → `datafusion` ≥53.1.0, which requires rustc ≥1.88. The shipped library still builds on 1.86; only the test / `--all-targets` build needs the newer toolchain. CI (`build.yaml`) runs fmt, clippy and the library build on 1.86, and runs the test-compiling steps with `cargo +stable`.
- **The wasm bindings (`ggsql-wasm`).** R doesn't use wasm, and some wasm-only dependencies require a newer rustc, so the crate has no `rust-version` and a nested `ggsql-wasm/rust-toolchain.toml` selects **stable** for any build done from that directory (`./build-wasm.sh`, `wasm-pack`, `library/`).

Cross-platform installers (NSIS / MSI / DMG / Deb): see [`INSTALLERS.md`](INSTALLERS.md). Releases are tag-driven via `.github/workflows/`.

## Testing
Expand Down
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ resolver = "2"
[workspace.package]
version = "0.3.3"
edition = "2021"
# Pinned to CRAN's maximum supported Rust version for the R bindings. Only bump
# this when CRAN does. Setting it here also turns on clippy's `incompatible_msrv`
# lint, which catches accidental use of std APIs newer than this version.
rust-version = "1.86"
authors = ["ggsql Team"]
license = "MIT"
repository = "https://github.com/posit-dev/ggsql"
Expand Down
1 change: 1 addition & 0 deletions ggsql-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "ggsql-cli"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
Expand Down
1 change: 1 addition & 0 deletions ggsql-jupyter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "ggsql-jupyter"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
Expand Down
1 change: 1 addition & 0 deletions ggsql-wasm/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ ggsql-wasm/

## Toolchain

- **Rust stable, not the workspace 1.86 MSRV.** The rest of the workspace is pinned to 1.86 for the R/CRAN bindings (see [`/CLAUDE.md`](../CLAUDE.md)), but R doesn't use wasm and some wasm-only deps need a newer rustc. A nested [`rust-toolchain.toml`](rust-toolchain.toml) selects stable for any build run from this directory; this crate has no `rust-version`. In CI the wasm tool installs (`cargo install wasm-pack`/`wasm-opt`) run at the repo root, so they use `cargo +stable` to avoid the 1.86 pin.
- Rust target `wasm32-unknown-unknown` and [`wasm-pack`](https://rustwasm.github.io/wasm-pack/) for compilation.
- A clang/llvm with wasm backend support (the build script verifies this with a one-line probe).
- `wasm-opt` (from binaryen) for the `-Oz` optimization step.
Expand Down
3 changes: 3 additions & 0 deletions ggsql-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
name = "ggsql-wasm"
version.workspace = true
edition.workspace = true
# No `rust-version`: the wasm bindings are not part of the R/CRAN 1.86 MSRV
# guarantee (R doesn't use them) and some wasm-only dependencies require a newer
# rustc. This crate builds on stable — see ggsql-wasm/rust-toolchain.toml.
authors.workspace = true
license.workspace = true
repository.workspace = true
Expand Down
7 changes: 7 additions & 0 deletions ggsql-wasm/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# The wasm bindings are exempt from the workspace's 1.86 MSRV pin (R/CRAN, see
# /rust-toolchain.toml): R doesn't use wasm, and some wasm-only dependencies
# require a newer rustc. Building from this directory (./build-wasm.sh,
# wasm-pack, library/) picks up this file and uses stable instead.
[toolchain]
channel = "stable"
targets = ["wasm32-unknown-unknown"]
6 changes: 6 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Pinned to CRAN's maximum supported Rust version so the R bindings keep
# building. Only bump this (and `rust-version` in Cargo.toml) when CRAN raises
# the Rust version it ships. See /CLAUDE.md.
[toolchain]
channel = "1.86"
components = ["rustfmt", "clippy"]
1 change: 1 addition & 0 deletions src/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "ggsql"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion src/plot/scale/linetype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fn parse_hex_linetype(s: &str) -> Option<Vec<u32>> {
let len = s.len();

// Must be even length, 2-8 characters, all hex digits
if !(2..=8).contains(&len) || !len.is_multiple_of(2) {
if !(2..=8).contains(&len) || len % 2 != 0 {
return None;
}

Expand Down
1 change: 1 addition & 0 deletions tree-sitter-ggsql/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading