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: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[alias]
xtask = "run --locked --package xtask --"
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Keep source and notice hashes identical on Unix and Windows checkouts.
* text=auto eol=lf

# Preserve whitespace in original third-party license notices.
licenses/** -whitespace

*.png binary
*.ico binary
*.icns binary
*.zip binary
*.gz binary
77 changes: 77 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: CI

on:
push:
branches: [main]
pull_request:
workflow_dispatch:
workflow_call:

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
native:
name: Native ${{ matrix.target }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-24.04
target: x86_64-unknown-linux-gnu
- runner: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
- runner: windows-2025
target: x86_64-pc-windows-msvc
- runner: windows-11-arm
target: aarch64-pc-windows-msvc
- runner: macos-15-intel
target: x86_64-apple-darwin
- runner: macos-15
target: aarch64-apple-darwin
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: "1"
TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install Linux development libraries
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libxkbcommon-dev libwayland-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libegl1-mesa-dev
- name: Install pinned Rust toolchain
run: rustup toolchain install 1.100.1 --profile minimal --component clippy --component rustfmt --target "$TARGET"
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
with:
key: ${{ matrix.target }}
- name: Format, layers, Clippy, tests and build
run: cargo xtask check --target "$TARGET"
- name: Package unsigned development bundle
run: cargo xtask package --target "$TARGET"
- name: Native command smoke test
run: |
suffix=""
if [[ "$RUNNER_OS" == "Windows" ]]; then suffix=".exe"; fi
"target/$TARGET/release/arcforge-cli$suffix" --version
"target/$TARGET/release/arcforge-cli$suffix" commands --json
"target/$TARGET/release/arcforge-cli$suffix" doctor --json
"target/$TARGET/release/arcforge$suffix" --version
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: arcforge-${{ matrix.target }}
path: dist/*
if-no-files-found: error
compression-level: 0
retention-days: 14
52 changes: 52 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Development release

on:
push:
tags: ["v*"]

permissions:
contents: read

jobs:
build:
uses: ./.github/workflows/ci.yml
permissions:
contents: read
draft:
needs: build
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Verify tag matches workspace version
run: |
python3 - <<'PY'
import os, pathlib, tomllib
version = tomllib.loads(pathlib.Path('Cargo.toml').read_text())['workspace']['package']['version']
tag = os.environ['GITHUB_REF_NAME']
if tag != f'v{version}':
raise SystemExit(f'Tag {tag!r} must match workspace version v{version}')
PY
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: arcforge-*
path: dist
merge-multiple: true
- name: Check all development bundle checksums
working-directory: dist
run: sha256sum --check --strict *.sha256
- name: Create draft release
env:
GH_TOKEN: ${{ github.token }}
run: |
cat > release-notes.txt <<'EOF'
Unsigned ArcForge development bundles for macOS, Windows and Linux, on x86-64 and ARM64.

These are portable bootstrap builds, not production installers. They do not configure file associations or include signing/notarization. Consult the bundled README for currently implemented functionality.

SHA-256 checksums and license notices are provided. Native CI command smoke tests do not establish full GUI or archive-feature parity.
EOF
gh release create "$GITHUB_REF_NAME" dist/* --verify-tag --draft --title "ArcForge $GITHUB_REF_NAME" --notes-file release-notes.txt
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# will have compiled files and executables
debug
target
/dist/

# These are backup files generated by rustfmt
**/*.rs.bk
Expand Down
25 changes: 25 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Working on ArcForge

ArcForge is a Rust archive-manager project. The current repository is a bootstrap, not a working archive editor. [Issue #1](https://github.com/stokaro/arcforge/issues/1) defines the product scope and acceptance criteria.

## Boundaries

- Put archive models, capabilities, commands, and validation in `crates/core`. Keep this crate independent of UI and windowing libraries.
- Put presentation and interaction in `crates/ui-egui`. The UI calls shared core operations; it does not implement a second archive engine.
- Keep `apps/arcforge` and `apps/arcforge-cli` thin. The CLI must remain usable without a display server or GUI dependencies.
- Put build orchestration and architecture checks in `xtask`. Keep build commands portable; avoid shell-specific orchestration.
- Register new workspace crates and dependencies in the boundary checker. Do not disable checks to accommodate an accidental dependency direction.

## Implementation

- Add a regression test for a changed archive behavior, command contract, or data-preservation guarantee. Use temporary directories and synthetic or redistributable fixtures.
- Keep the capability registry truthful. Planned, unsupported, and implemented operations are distinct; return an explicit unsupported result instead of a success-shaped placeholder.
- Keep blocking I/O and archive processing out of UI rendering. Preserve the source archive on failed or cancelled updates.
- Pin dependencies through `Cargo.lock`; use the toolchain in `rust-toolchain.toml`. Document platform requirements when adding native dependencies.
- When adapting external source, record its upstream path, commit, selected license, and modifications in [the reuse inventory](docs/artcraft-reuse.md). Retain the required full license notices.

## Verification and pull requests

Run `cargo xtask check` and the relevant automated tests. Use `cargo xtask build`, `test`, and `package` as documented in [development.md](docs/development.md). Report which platforms actually ran; compilation alone does not verify desktop behavior.

PR descriptions explain the problem, before/after behavior, implementation, and verification. Include a compact Mermaid diagram when the change alters a flow. State remaining limitations directly. Update the relevant documentation and linked epic checkboxes only for work actually completed.
23 changes: 23 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Contributing

The [implementation epic](https://github.com/stokaro/arcforge/issues/1) defines ArcForge's planned archive-editor behavior. The repository currently supplies the project structure, shared command/capability scaffolding, desktop shell, CLI, and build tooling. It does not yet provide production archive operations.

## Start here

1. Read [AGENTS.md](AGENTS.md), [architecture.md](docs/architecture.md), and [development.md](docs/development.md).
2. Choose a focused part of the epic and describe its observable result in an issue or PR.
3. Implement shared behavior in the core before exposing it through the GUI or CLI.
4. Add automated tests for the changed contract, including failure cases relevant to archive contents or source preservation.
5. Run `cargo xtask check` and the affected tests. For build or packaging changes, exercise the appropriate native platform and record the artifact produced.

## Reviewable changes

Keep PRs focused. Explain why the change is needed, the before/after behavior, and how it was verified. Add a small Mermaid diagram when a processing or user flow changes. Include screenshots for visible UI changes using repeatable fixtures and window sizes. Distinguish a tested result from an intended capability.

Builds on Windows, macOS, and Linux are part of the design. Avoid introducing a dependency on a particular shell, a globally installed archive utility, or the GUI into the CLI. New native dependencies need explicit target and packaging coverage.

## Source reuse and licensing

Original contributions use the repository's [MIT license](LICENSE). Existing adapted source retains its upstream notices. Record new source reuse in [docs/artcraft-reuse.md](docs/artcraft-reuse.md) or a corresponding inventory, with a pinned source URL and the applicable license text in `licenses/`.

The ArtCraft code references include files offered under MIT or Apache-2.0; ArcForge selects MIT for its recorded adaptations. ArtCraft branding and the shared raven icon are not part of that permission and are not used here. See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
Loading
Loading