diff --git a/.github/workflows/tests_and_checks.yml b/.github/workflows/tests_and_checks.yml index a55a611c..d9728301 100644 --- a/.github/workflows/tests_and_checks.yml +++ b/.github/workflows/tests_and_checks.yml @@ -90,11 +90,16 @@ jobs: - name: Run Linter run: cargo clippy --all -- -D warnings - - name: Verify Publishing of crates - uses: katyo/publish-crates@v2 - if: ${{ matrix.rust-toolchain == 'stable' && github.event_name == 'push' }} - with: - dry-run: true + # TODO: turn-on after first release for test dry-runs + # - name: Install cargo-release + # if: ${{ matrix.rust-toolchain == 'stable' && github.event_name == 'push' }} + # uses: taiki-e/install-action@v2 + # with: + # tool: cargo-release + + # - name: Dry-run cargo release + # if: ${{ matrix.rust-toolchain == 'stable' && github.event_name == 'push' }} + # run: cargo release --workspace # Only "test" release build on push event. - name: Test Release diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index a92f110e..afc7f691 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -10,6 +10,7 @@ - [Pre-commit Hook](#pre-commit-hook) - [Recommended Development Flow](#recommended-development-flow) - [Conventional Commits](#conventional-commits) +- [Non-Rust Dependencies](#non-rust-dependencies) ## Building and Running the Project @@ -94,6 +95,7 @@ with `experimental` and `buildkit` set to `true`, for example: ``` ## Nix + This repository contains a [Nix flake][nix-flake] that initiates both the Rust toolchain set in [rust-toolchain.toml](./rust-toolchain.toml) and a [pre-commit hook](#pre-commit-hook). It also installs @@ -159,6 +161,27 @@ a type of `fix`, `feat`, `docs`, `ci`, `refactor`, etc..., structured like so: [optional footer(s)] ``` +## Non-Rust Dependencies + +### wit-deps + +We are using [wit-deps][wit-deps] to track [WIT][wit] dependencies/interfaces, +which is installed by default in our [Nix flake](#nix) or can be +installed separately with `cargo install`. + +To see an example of `wit-deps` in action, view our +[host helpers](./homestar-wasm/wit/helpers.wit), where we import +the [wasi-logging][wasi-logging] interface. We track this dependency in our +[`deps.toml`](./homestar-wasm/wit/deps.toml) file: + +```toml +logging = "https://github.com/WebAssembly/wasi-logging/archive/main.tar.gz" +``` + +To update packages, we can run `wit-deps` within the [homestar-wasm](./homestar-wasm) +directory. + + [buildx]: https://docs.docker.com/engine/reference/commandline/buildx/ [cargo-expand]: https://github.com/dtolnay/cargo-expand [cargo-nextest]: https://nexte.st/index.html @@ -174,4 +197,6 @@ a type of `fix`, `feat`, `docs`, `ci`, `refactor`, etc..., structured like so: [nix-flake]: https://nixos.wiki/wiki/Flakes [pre-commit]: https://pre-commit.com/ [tokio-console]: https://github.com/tokio-rs/console +[wit]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md [wit-bindgen]: https://github.com/bytecodealliance/wit-bindgen +[wit-deps]: https://github.com/bytecodealliance/wit-deps diff --git a/README.md b/README.md index 8326ec8d..0371bb81 100644 --- a/README.md +++ b/README.md @@ -65,9 +65,9 @@ If you're looking to help develop `Homestar`, please dive right into our [development](./DEVELOPMENT.md) guide. Otherwise, the easiest way to get started and see `Homestar` in action is to -follow-along and run our image-processing -[websocket relay](./examples/websocket-relay) example, which integrates -`Homestar` with a browser application to run a +follow-along with our [examples](./examples). To start, try out our +image-processing [websocket relay](./examples/websocket-relay) example, which +integrates `Homestar` with a browser application to run a statically-configured workflow. The associated `README.md` walks through what to install (i.e. `rust`, `node/npm`, `ipfs`), what commands to run, and embeds a video demonstrating its usage. diff --git a/homestar-wasm/src/wasmtime/world.rs b/homestar-wasm/src/wasmtime/world.rs index 1335fec0..bcb0540e 100644 --- a/homestar-wasm/src/wasmtime/world.rs +++ b/homestar-wasm/src/wasmtime/world.rs @@ -111,6 +111,7 @@ impl State { self.fuel = fuel } + /// Initial time from instantiation. pub fn start_time(&self) -> Instant { self.start_time }