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: 9 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ jobs:
echo "CARGO_TARGET_${target_env}_LINKER=musl-gcc" >> "$GITHUB_ENV"
echo "CC_${TARGET//-/_}=musl-gcc" >> "$GITHUB_ENV"
- run: python -m unittest discover -s scripts -p '*_test.py'
- run: cargo xtask pin-runtime --check
- run: cargo fmt --all -- --check
- run: cargo clippy --locked --all-targets --target ${{ matrix.target }} -- -D warnings
- run: cargo test --locked --target ${{ matrix.target }}
- run: cargo clippy --workspace --locked --all-targets --target ${{ matrix.target }} -- -D warnings
- run: cargo test --workspace --locked --target ${{ matrix.target }}
- run: cargo build --locked --release --target ${{ matrix.target }}
- run: python scripts/package_release.py ${{ matrix.target }}
- uses: actions/upload-artifact@v4
Expand All @@ -78,6 +79,9 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Require a published runtime pin before releasing the CLI
run: cargo xtask pin-runtime --check --require
- uses: actions/download-artifact@v4
with:
pattern: adapt-*
Expand Down Expand Up @@ -109,6 +113,9 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Require a published runtime pin before releasing the CLI
run: cargo xtask pin-runtime --check --require
- uses: actions/download-artifact@v4
with:
pattern: adapt-*
Expand Down
166 changes: 163 additions & 3 deletions Cargo.lock

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

9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[workspace]
members = [".", "xtask"]
default-members = ["."]
resolver = "3"

[package]
name = "platform-cli"
version = "0.1.0"
Expand Down Expand Up @@ -27,6 +32,10 @@ url = "2.5"
uuid = { version = "1.27", features = ["v4", "serde"] }

[target.'cfg(unix)'.dependencies]
flate2 = "1"
hex = "0.4"
sha2 = "0.11"
tar = "0.4"
libc = "0.2"

[profile.release]
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,10 @@ Use `--no-expiry` to disable automatic expiry.

### Run sandboxes locally

On Apple Silicon macOS or x86_64 Linux with KVM, point Adapt at a compatible
Goblin bundle containing `goblind` and an embedded-firmware `goblin-worker`:
On Apple Silicon macOS or x86_64 Linux with KVM, Adapt downloads and verifies
its pinned Goblin runtime on first local use:

```sh
export ADAPT_LOCAL_RUNTIME=/path/to/goblin-release/bin
adapt sandbox sh --local --image ubuntu:24.04 -- uname -m
adapt sandbox sh --local
adapt --local sandbox create --image ubuntu:24.04 --wait
Expand All @@ -103,7 +102,10 @@ Adapt starts and reuses a private local manager without Platform login. The shel
or command from `sandbox sh` runs in a VM that is deleted when the session ends.
`sandbox create` keeps the VM for later commands until you stop or delete it. Existing
commands keep their cloud default; `sandbox sh --cloud` selects it explicitly.
This initial local workflow requires a manually supplied runtime bundle. See
Use `adapt runtime install` to download ahead of time and `adapt runtime status`
to inspect the pin and installation path. Local downloads need no login. Developers
can still supply `ADAPT_LOCAL_RUNTIME=/path/to/goblin-release/bin` or `--runtime-dir`.
See
[local sandbox options and limitations](docs/cli-reference.md#local-sandboxes).

## Create a sandbox
Expand Down
Loading
Loading