From af8a33b1a0ebd8a5702aa703910f9576ceddb881 Mon Sep 17 00:00:00 2001 From: noah Date: Tue, 13 Oct 2026 11:22:39 -0600 Subject: [PATCH] Add target inventory executable for SDK images --- .gitea/workflows/main.yml | 4 ++-- .gitea/workflows/next.yml | 5 ++--- README.md | 4 +++- src/main.rs | 20 ++++++++++++++++++++ 4 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 src/main.rs diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index 08389c6..2e0ca7f 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -33,10 +33,10 @@ jobs: run: | mkdir -p dist git archive --format=tar.gz --output="dist/alkane-os-${{ steps.version.outputs.version }}-source.tar.gz" HEAD + cp target/release/alkane-os dist/ cp bench-current.txt dist/ - name: Create private release if: steps.version.outputs.release == 'true' env: GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: python3 ci/release.py "${{ steps.version.outputs.tag }}" false "dist/alkane-os-${{ steps.version.outputs.version }}-source.tar.gz" dist/bench-current.txt - + run: python3 ci/release.py "${{ steps.version.outputs.tag }}" false "dist/alkane-os-${{ steps.version.outputs.version }}-source.tar.gz" dist/alkane-os dist/bench-current.txt diff --git a/.gitea/workflows/next.yml b/.gitea/workflows/next.yml index 9fc446d..e8a334b 100644 --- a/.gitea/workflows/next.yml +++ b/.gitea/workflows/next.yml @@ -21,10 +21,9 @@ jobs: run: | mkdir -p dist git archive --format=tar.gz --output="dist/alkane-os-${{ steps.version.outputs.version }}-source.tar.gz" HEAD - cp target/release/libalkane_os.rlib dist/ + cp target/release/alkane-os dist/ - name: Create private prerelease if: steps.version.outputs.release == 'true' env: GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: python3 ci/release.py "${{ steps.version.outputs.tag }}" true "dist/alkane-os-${{ steps.version.outputs.version }}-source.tar.gz" - + run: python3 ci/release.py "${{ steps.version.outputs.tag }}" true "dist/alkane-os-${{ steps.version.outputs.version }}-source.tar.gz" dist/alkane-os diff --git a/README.md b/README.md index 7966027..1b446f7 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,9 @@ simulator must record the first genuine rejection gate and Alkane OS must mine. No live board is required by CI. Bench devices supply captures and independent validation of the simulator. +The current executable lists target obligations (`alkane-os --list-targets`) +and its version. It does not start a miner or a network service. + The `main` branch has full tests and a conformance gate; releases are created only after every required cell passes. `next` runs a build check and produces release candidates. `ci/version-x.txt` is the manually edited major version. @@ -33,4 +36,3 @@ python3 ci/check-conformance.py The last command currently fails because simulator and device evidence are still pending. It is a release gate, not a unit test. - diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..ce0e147 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,20 @@ +use alkane_os::target_matrix; + +fn main() { + match std::env::args().nth(1).as_deref() { + Some("--list-targets") => { + println!("control_board,hash_chip,algorithm"); + for target in target_matrix() { + println!( + "{},{},{:?}", + target.control.id, target.chip.id, target.chip.algorithm + ); + } + } + Some("--version") => println!("alkane-os {}", env!("CARGO_PKG_VERSION")), + _ => { + eprintln!("usage: alkane-os --list-targets | --version"); + std::process::exit(2); + } + } +}