diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3834fb4..a394ce8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,12 @@ jobs: - name: Check out repository uses: actions/checkout@v7 + - name: Install latest stable Rust toolchain + run: rustup toolchain install stable --profile minimal --component clippy,rustfmt,llvm-tools-preview + + - name: Verify crates.io package + run: cargo +stable publish --dry-run --locked + - name: Read supported specification revision id: specification shell: bash @@ -31,9 +37,6 @@ jobs: ref: ${{ steps.specification.outputs.revision }} path: .stack-specification - - name: Install latest stable Rust toolchain - run: rustup toolchain install stable --profile minimal --component clippy,rustfmt,llvm-tools-preview - - name: Check formatting run: cargo +stable fmt --check diff --git a/Cargo.toml b/Cargo.toml index 8d7aa20..690f03c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,8 +5,12 @@ edition = "2024" rust-version = "1.85" license = "Apache-2.0" description = "Reference compiler frontend for the Stack diagram language" +homepage = "https://stack-diagram.com/" repository = "https://github.com/stack-sh/compiler" +documentation = "https://docs.rs/stack-compiler" readme = "README.md" +publish = ["crates-io"] +include = ["src/**", "tests/**", "Cargo.toml", "README.md", "LICENSE"] keywords = ["stack", "diagram", "dsl", "compiler"] categories = ["parser-implementations"] diff --git a/README.md b/README.md index 48c1860..351a92a 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,16 @@ Stack 1.0 and this compiler are both under active development. Public Rust APIs Development and primary CI follow the latest stable Rust and Cargo releases through [`rust-toolchain.toml`](./rust-toolchain.toml). Rust 1.85 remains the minimum supported version and is verified in a separate CI job. +## Cargo package + +Add the compiler library from crates.io with: + +```sh +cargo add stack-compiler@0.1.0 +``` + +The published package is built and documented on Rust 1.85 or newer. Repository CI performs a full crates.io packaging dry run so the released source archive remains independent of Git checkouts. + ## Pipeline ```text