Skip to content

Commit

Permalink
chore: ci (ipvm-wg#499)
Browse files Browse the repository at this point in the history
* add wit-deps docs
* move release-check away from https://github.com/katyo/publish-crates
(and turn on once we have the first release)
  • Loading branch information
Zeeshan Lakhani authored Jan 13, 2024
1 parent e602066 commit 867df1f
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 8 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/tests_and_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 25 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions homestar-wasm/src/wasmtime/world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ impl State {
self.fuel = fuel
}

/// Initial time from instantiation.
pub fn start_time(&self) -> Instant {
self.start_time
}
Expand Down

0 comments on commit 867df1f

Please sign in to comment.