Skip to content
Draft
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: 2 additions & 0 deletions .github/.codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ comment: false

ignore:
- "**/tests/**"
- "**/test_utils.rs"
- "**/build.rs"

coverage:
status:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: build-prqlc
name: build-prqlc-cli
description: >
Build prqlc
Build prqlc CLI binary

Note that much of this is copy/pasted into build-prqlc-c, so changes here
should generally be copied into that file.
Expand Down Expand Up @@ -77,7 +77,7 @@ runs:
args:
--profile=${{ inputs.profile }} --locked --target=${{ inputs.target }}
--no-default-features --features=${{ inputs.features }} ${{
contains(inputs.target, 'musl') && '--package=prqlc' ||
contains(inputs.target, 'musl') && '--package=prqlc-cli' ||
'--all-targets' }}

- name: Create artifact for Linux and macOS
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build-devcontainer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ jobs:
timeout-minutes: 240
steps:
- uses: actions/checkout@v5
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/login-action@v3
with:
registry: ghcr.io
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
}
})

build-prqlc:
build-prqlc-cli:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -57,18 +57,17 @@ jobs:
# Intel macOS build
- os: macos-15-intel
target: x86_64-apple-darwin
features: default,test-dbs
permissions:
contents: write
steps:
- name: 📂 Checkout code
uses: actions/checkout@v5
- uses: ./.github/actions/build-prqlc
- uses: ./.github/actions/build-prqlc-cli
id: build-artifact
with:
target: ${{ matrix.target }}
profile: release
features: cli
features: default
- name: Upload release artifact
if: github.event_name == 'release'
uses: softprops/action-gh-release@v2
Expand All @@ -91,7 +90,7 @@ jobs:
./temp_path/prqlc --help

build-prqlc-c:
# Mostly a copy/paste of `build-prqlc`.
# Mostly a copy/paste of `build-prqlc-cli`.
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -124,7 +123,7 @@ jobs:

publish-winget:
runs-on: ubuntu-24.04
needs: build-prqlc
needs: build-prqlc-cli
if: github.event_name == 'release'
steps:
- name: publish
Expand All @@ -144,7 +143,7 @@ jobs:
target:
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-musl
needs: build-prqlc
needs: build-prqlc-cli
permissions:
contents: write
steps:
Expand Down Expand Up @@ -199,7 +198,7 @@ jobs:
target:
- x86_64-unknown-linux-musl
#- aarch64-unknown-linux-musl # https://github.com/jiro4989/build-rpm-action/issues/6
needs: build-prqlc
needs: build-prqlc-cli
permissions:
contents: write
steps:
Expand Down Expand Up @@ -412,5 +411,6 @@ jobs:
push-devcontainer:
if: github.event_name == 'release'
uses: ./.github/workflows/build-devcontainer.yaml
secrets: inherit
with:
push: true
6 changes: 6 additions & 0 deletions .github/workflows/test-rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ jobs:
uses: actions/checkout@v5
with:
fetch-tags: true
- name: Log in to Docker Hub
if: ${{ contains(inputs.features, 'test-dbs-external') }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Run docker compose
# This can go early because the DBs take a few seconds to start up.
if: ${{ contains(inputs.features, 'test-dbs-external') }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ jobs:
needs: rules
if: needs.rules.outputs.rust == 'true' || needs.rules.outputs.main == 'true'
uses: ./.github/workflows/test-rust.yaml
secrets: inherit
strategy:
matrix:
include:
Expand Down Expand Up @@ -326,6 +327,7 @@ jobs:
# target: aarch64-unknown-linux-musl

uses: ./.github/workflows/test-rust.yaml
secrets: inherit
with:
os: ${{ matrix.os }}
target: ${{ matrix.target }}
Expand Down Expand Up @@ -534,6 +536,7 @@ jobs:
needs: rules
if: needs.rules.outputs.devcontainer-build == 'true'
uses: ./.github/workflows/build-devcontainer.yaml
secrets: inherit
# One problem with this setup is that if another commit is merged to main,
# this workflow will cancel existing jobs, and so this won't get pushed. We
# have another workflow which runs on each release, so the image should get
Expand All @@ -554,13 +557,10 @@ jobs:
- uses: baptiste0928/cargo-install@v3
with:
crate: cargo-msrv
# TODO: remove this version pinning
# The latest 0.16 supports workspace inheritance, so the check will fail
version: "0.15"
# Note this currently uses a manually maintained key in
# `prqlc/prqlc/Cargo.toml`, because of
# https://github.com/foresterre/cargo-msrv/issues/590
- name: Verify minimum rust version — prqlc
- name: Verify minimum rust version — prqlc library
# Ideally we'd check all crates, ref https://github.com/foresterre/cargo-msrv/issues/295
working-directory: prqlc/prqlc
run: cargo msrv verify
Expand Down Expand Up @@ -664,7 +664,7 @@ jobs:
"test-taskfile"
]

build-prqlc:
build-prqlc-cli:
runs-on: ${{ matrix.os }}
needs: rules
if: needs.rules.outputs.rust == 'true' || needs.rules.outputs.main == 'true'
Expand All @@ -691,7 +691,7 @@ jobs:
steps:
- name: 📂 Checkout code
uses: actions/checkout@v5
- uses: ./.github/actions/build-prqlc
- uses: ./.github/actions/build-prqlc-cli
with:
target: ${{ matrix.target }}
profile: dev
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@

**Internal changes**:

- Extract CLI binary into separate `prqlc-cli` crate. The `prqlc` crate is now a
pure library; the `cli` feature has been removed and replaced by a `display`
feature that gates ariadne/anstream. The CLI binary name remains `prqlc`.
Install with `cargo install prqlc-cli`. (@snth)

**New Contributors**:

## 0.13.11 — 2026-03-19
Expand Down
46 changes: 34 additions & 12 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ members = [
"prqlc/bindings/js",
"prqlc/bindings/prqlc-c",
"prqlc/bindings/prqlc-python",
"prqlc/prqlc-cli",
"prqlc/prqlc-macros",
"prqlc/prqlc-parser",
"prqlc/prqlc",
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ To stay in touch with PRQL:
This repo is composed of:

- **[prqlc](./prqlc/)** — the compiler, written in rust, whose main role is to
compile PRQL into SQL. Also contains the CLI and bindings from various
languages.
compile PRQL into SQL. Also contains the [CLI](./prqlc/prqlc-cli/) and
bindings from various languages.
- **[web](./web/)** — our web content: the [Book][prql book],
[Website][prql website], and [Playground][prql playground].

Expand Down
2 changes: 1 addition & 1 deletion prqlc/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ includes:
dir: ./bindings/prqlc-python

vars:
packages_core: -p prqlc-parser -p prqlc
packages_core: -p prqlc-parser -p prqlc -p prqlc-cli
packages_addon: -p prqlc-macros -p compile-files
packages_bindings: -p prql -p prql-java -p prqlc-js -p prqlc-c -p prqlc-python

Expand Down
2 changes: 1 addition & 1 deletion prqlc/bindings/elixir/native/prql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ path = "src/lib.rs"
test = false

[target.'cfg(not(any(target_family="wasm")))'.dependencies]
prqlc = { path = "../../../../prqlc", default-features = false, version = "0.13.12" }
prqlc = { path = "../../../../prqlc", version = "0.13.12" }
rustler = "0.37.0"
2 changes: 1 addition & 1 deletion prqlc/bindings/java/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test = false

[dependencies]
jni = "0.21.1"
prqlc = {path = "../../prqlc", default-features = false}
prqlc = {path = "../../prqlc"}

[package.metadata.release]
tag-name = "{{version}}"
Expand Down
2 changes: 1 addition & 1 deletion prqlc/bindings/js/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test = false
default = ["console_error_panic_hook"]

[target.'cfg(target_family="wasm")'.dependencies]
prqlc = {path = "../../prqlc", default-features = false}
prqlc = {path = "../../prqlc"}
wasm-bindgen = "0.2.114"

# The `console_error_panic_hook` crate provides better debugging of panics by
Expand Down
2 changes: 1 addition & 1 deletion prqlc/bindings/js/tests/test_all.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe("prqlc-js", () => {

describe("get_targets", () => {
it("return a list of targets", () => {
const targets = new prqlc.get_targets();
const targets = prqlc.get_targets();
assert(targets.length > 0);
assert(targets.includes("sql.sqlite"));
});
Expand Down
2 changes: 1 addition & 1 deletion prqlc/bindings/prqlc-c/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test = false

[dependencies]
libc = "0.2.183"
prqlc = {path = "../../prqlc", default-features = false}
prqlc = {path = "../../prqlc"}
serde_json = {workspace = true}

[package.metadata.release]
Expand Down
2 changes: 1 addition & 1 deletion prqlc/bindings/prqlc-python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pyo3 = {workspace = true}

[dependencies]
# Renamed to avoid conflicts in lib.rs
prqlc_lib = {package = "prqlc", path = "../../prqlc", default-features = false}
prqlc_lib = {package = "prqlc", path = "../../prqlc"}

[dev-dependencies]
insta = {workspace = true}
Expand Down
Loading
Loading