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
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ jobs:
./target/release/stack check --help
./target/release/stack fmt --help
./target/release/stack render --help
./target/release/stack icons --help
./target/release/stack icons import --help
- name: Verify repository files
run: |
test -s README.md
Expand All @@ -76,9 +78,11 @@ jobs:
test -s CONTRIBUTING.md
test -s SECURITY.md
test -s docs/publication-audit.md
test -s docs/provider-icon-import.md
test -s Cargo.toml
test -s Cargo.lock
test -s src/main.rs
test -s src/provider.rs
test -s tests/specification-revision
test -s tests/fixtures/render.stack

Expand Down
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

## Language

Write repository content, code comments, commit messages, issues, and pull requests in English even though this repository is private.
Write repository content, code comments, commit messages, issues, and pull requests in English.

## Architecture

- Keep this repository focused on the native `stack` command, host I/O, exit codes, configuration discovery, provider-pack import, and notice output.
- Link `stack-engine` as a native Rust dependency; do not duplicate compiler, formatter, layout, or SVG-rendering logic.
- Keep provider-pack import, local cache behavior, provenance display, and notice output at the CLI boundary. Do not make the engine read the filesystem or network.
- Import only audited local archives with pinned complete-file hashes and allowlisted entries. Bound archive and entry sizes, reject unsafe paths and active SVG content, and write new pack directories atomically without overwriting existing data.
- Do not add authentication, billing, entitlement, or proprietary-theme delivery behavior; they are outside the product roadmap.

## Licensing and security
Expand Down
196 changes: 191 additions & 5 deletions Cargo.lock

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

7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ name = "stack"
path = "src/main.rs"

[dependencies]
stack-engine = { git = "https://github.com/stack-sh/engine.git", rev = "e1240661b6d8cebd95ef24207618a62fadb15b48" }
roxmltree = "=0.21.1"
serde_json = "=1.0.151"
sha2 = "=0.11.0"
stack-engine = { git = "https://github.com/stack-sh/engine.git", rev = "66a1d183a9b743990a4e0b7139fbe25b8bf5eb08" }
stack-theme = { git = "https://github.com/stack-sh/theme.git", rev = "5dbe41326370260cfc6b72d4aab4470318d66dab" }
zip = { version = "=6.0.0", default-features = false, features = ["deflate-flate2-zlib-rs"] }

[features]
conformance = []
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ stack fmt --check arch.stack
stack fmt -
stack render arch.stack
stack render arch.stack -o arch.svg
stack icons import aws ~/Downloads/aws-icons.zip --accept-terms -o .stack-icons/aws
```

`stack check` reads the file as bytes and runs the full compiler, theme, layout, and routing validation pipeline without changing the source. Diagnostics are written to standard error in source order. Standard output remains empty.
Expand All @@ -21,6 +22,8 @@ stack render arch.stack -o arch.svg

`stack render` uses the same engine pipeline to produce deterministic standalone SVG. Without `-o`, standard output contains only SVG. With `-o`, the output is written atomically in the destination directory. Diagnostics remain on standard error, warnings preserve SVG, and Stack errors never create or replace output.

`stack icons import` creates a local provider pack from an official ZIP archive that the user selected. It performs no network request or upload, requires explicit terms acceptance, verifies the complete archive against an audited SHA-256, reads only allowlisted SVG entries with fixed size limits, removes active or external content, preserves the official colors and geometry, and writes the manifest, notice, and processed SVGs atomically to a new directory. The initial audited profiles import 7 AWS, 6 Google Cloud, or 5 Azure icons. See [the provider icon import guide](./docs/provider-icon-import.md) for exact sources, hashes, IDs, and terms.

| Result | Exit status |
| --- | ---: |
| No error diagnostics, including warning-only input | `0` |
Expand All @@ -29,7 +32,7 @@ stack render arch.stack -o arch.svg

The CLI links `stack-engine` as a native Rust dependency. It owns filesystem and standard-stream behavior, process exit codes, configuration discovery, provider-pack import, notice output, and command presentation. It must not duplicate compiler, formatter, layout, or SVG-rendering logic.

The bundled engine resolves the provider-neutral core icons `api`, `web`, `mobile`, `desktop`, `server`, `container`, `cluster`, `cloud`, `scheduler`, `webhook`, `identity`, and `observability`. Vendor assets are not bundled unless their exact terms permit software redistribution. Future provider-pack support will preserve upstream artwork and attach source and terms metadata.
The bundled engine resolves the provider-neutral core icons `api`, `web`, `mobile`, `desktop`, `server`, `container`, `cluster`, `cloud`, `scheduler`, `webhook`, `identity`, and `observability`. Vendor assets are not bundled. Local provider-pack import preserves upstream artwork and attaches source, archive hash, transformation, terms, and notice metadata; Engine rendering of those packs is a separate compatibility step.

## Development

Expand Down
13 changes: 10 additions & 3 deletions THIRD_PARTY_LICENSES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ Audit date: 2026-09-04

| Component | Version or revision | License | Source | Distribution note |
| --- | --- | --- | --- | --- |
| `stack-engine` / `stack-formatter` | `e1240661b6d8cebd95ef24207618a62fadb15b48` | Apache-2.0 | <https://github.com/stack-sh/engine> | Linked into the native binary; includes the repository-authored core icon catalog through `stack-theme`. |
| `stack-engine` / `stack-formatter` | `66a1d183a9b743990a4e0b7139fbe25b8bf5eb08` | Apache-2.0 | <https://github.com/stack-sh/engine> | Linked into the native binary; includes the repository-authored core icon catalog through `stack-theme`. |
| `stack-compiler` | `3d2379483da1edaeb24a26d43743587a4f5bd645` | Apache-2.0 | <https://github.com/stack-sh/compiler> | Linked transitively through `stack-engine`. |
| `stack-theme` | `d25b883884420adcc124e4c9c786ad92925eae60` | Apache-2.0 | <https://github.com/stack-sh/theme> | Linked transitively through `stack-engine`; its 30 fallback and 12 explicit core SVGs are Stack-authored Apache-2.0 assets. |
| `stack-theme` | `5dbe41326370260cfc6b72d4aab4470318d66dab` | Apache-2.0 | <https://github.com/stack-sh/theme> | Linked directly and through `stack-engine`; its 30 fallback and 12 explicit core SVGs are Stack-authored Apache-2.0 assets. It also provides the asset-free provider-pack contract and types. |
| `roxmltree` | `0.21.1` | MIT OR Apache-2.0 | <https://github.com/RazrFalcon/roxmltree> | Parses untrusted local SVG into a read-only tree before allowlisted serialization. |
| `sha2`, `digest`, `block-buffer`, `crypto-common`, `hybrid-array`, `const-oid`, `typenum` | `0.11.0`, `0.11.3`, `0.12.1`, `0.2.2`, `0.4.14`, `0.10.2`, `1.20.1` | MIT OR Apache-2.0 | <https://github.com/RustCrypto> | Computes complete archive and per-asset SHA-256 identities. |
| `zip` | `6.0.0` | MIT | <https://github.com/zip-rs/zip2> | Reads only audited, allowlisted entries from user-selected local ZIP archives. |
| `flate2` / `zlib-rs` / `crc32fast` | `1.1.10`, `0.6.7`, `1.5.1` | MIT OR Apache-2.0 / Zlib / MIT OR Apache-2.0 | <https://github.com/rust-lang/flate2-rs>, <https://github.com/trifectatechfoundation/zlib-rs>, <https://github.com/srijs/rust-crc32fast> | Pure Rust DEFLATE decoding and integrity checks for ZIP entries. |
| `indexmap` / `hashbrown` / `equivalent` | `2.14.1`, `0.17.1`, `1.0.2` | Apache-2.0 OR MIT | <https://github.com/indexmap-rs/indexmap>, <https://github.com/rust-lang/hashbrown>, <https://github.com/indexmap-rs/equivalent> | ZIP archive entry index. |
| `cfg-if` / `cpufeatures` / `libc` | `1.0.4`, `0.3.1`, `0.2.189` | MIT OR Apache-2.0 | <https://github.com/rust-lang/cfg-if>, <https://github.com/RustCrypto/utils>, <https://github.com/rust-lang/libc> | Target selection and SHA-256 acceleration support. |
| `serde` / `serde_core` | `1.0.229` | MIT OR Apache-2.0 | <https://github.com/serde-rs/serde> | Runtime catalog data types through `stack-theme`. |
| `serde_json` | `1.0.151` | MIT OR Apache-2.0 | <https://github.com/serde-rs/json> | Embedded catalog decoding through `stack-theme`. |
| `itoa` | `1.0.18` | MIT OR Apache-2.0 | <https://github.com/dtolnay/itoa> | Transitive runtime dependency of `serde_json`. |
Expand All @@ -34,7 +40,8 @@ A future binary archive must include:
- this repository's `LICENSE` and `NOTICE`;
- this inventory at the dependency versions resolved in that release's `Cargo.lock`;
- the Apache-2.0 text for Stack dependencies and dependencies distributed under the Apache-2.0 option;
- the complete MIT notices selected for `memchr`, `zmij`, and any dependency distributed under the MIT option;
- the complete MIT notices selected for `memchr`, `zmij`, `zip`, and any dependency distributed under the MIT option;
- the Zlib notice for `zlib-rs`;
- any additional license text or attribution introduced by a later runtime dependency or provider pack.

Build-only dependencies do not require inclusion in a binary archive when none of their source or object code is distributed, but they remain listed here so the audited build graph is reproducible.
Loading