From bfb6f511f9f01af1d3f1924e81ef084bc5898cb4 Mon Sep 17 00:00:00 2001 From: konojunya Date: Sat, 5 Sep 2026 13:40:11 +0900 Subject: [PATCH 1/2] Prepare stack-compiler for crates.io --- .github/workflows/ci.yml | 3 +++ Cargo.toml | 4 ++++ README.md | 10 ++++++++++ 3 files changed, 17 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3834fb4..5017fde 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,6 +53,9 @@ jobs: RUSTDOCFLAGS: -D warnings run: cargo +stable doc --no-deps + - name: Verify crates.io package + run: cargo +stable publish --dry-run --locked + - name: Install cargo-llvm-cov uses: taiki-e/install-action@e67fa11c4b9316fa714ddf0abed07a0c3143b95b # v2.87.4 with: 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 From f39a6f15afb2aa7e63b313909ccdfe58d69a439d Mon Sep 17 00:00:00 2001 From: konojunya Date: Sat, 5 Sep 2026 13:41:23 +0900 Subject: [PATCH 2/2] Package before the conformance checkout --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5017fde..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 @@ -53,9 +56,6 @@ jobs: RUSTDOCFLAGS: -D warnings run: cargo +stable doc --no-deps - - name: Verify crates.io package - run: cargo +stable publish --dry-run --locked - - name: Install cargo-llvm-cov uses: taiki-e/install-action@e67fa11c4b9316fa714ddf0abed07a0c3143b95b # v2.87.4 with: