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
31 changes: 30 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,38 @@ jobs:
- run: cargo clippy --locked --workspace --all-targets -- -D warnings
- run: cargo test --locked --workspace

check-wasm32:
name: Check wasm32
needs: changes
if: needs.changes.outputs.rust == 'true'
runs-on: ubuntu-latest
defaults:
run:
working-directory: ed
steps:
- uses: actions/checkout@v6
with:
path: ed
- name: Read Rust toolchain
run: |
rust_toolchain="$(sed -n 's/^channel = "\(.*\)"/\1/p' rust-toolchain.toml | head -n 1)"
test -n "$rust_toolchain"
echo "RUST_TOOLCHAIN=$rust_toolchain" >> "$GITHUB_ENV"
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
targets: wasm32-unknown-unknown
components: clippy
- uses: Swatinem/rust-cache@v2
with:
workspaces: ed
key: wasm32
- run: cargo check --locked --target wasm32-unknown-unknown -p ed-agent --all-targets
- run: cargo clippy --locked --target wasm32-unknown-unknown -p ed-agent --all-targets -- -D warnings

ci:
name: CI status
needs: [changes, actionlint, check]
needs: [changes, actionlint, check, check-wasm32]
if: always()
runs-on: ubuntu-latest
steps:
Expand Down
113 changes: 65 additions & 48 deletions Cargo.lock

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

8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ homepage = "https://ondeinference.com"

[workspace.dependencies]
# The inference engine Ed wraps, resolved from crates.io like any dependency
# (there is no path override to a sibling checkout). 1.3.2 is the first release
# with ChatEngine::complete, which ed-acp's local provider calls.
onde = { version = "1.3.2" }
# (there is no path override to a sibling checkout). 1.4.0 is the first release
# whose wasm32 stub engine matches the real engine's signatures, so ed-agent
# compiles for wasm32-unknown-unknown. ChatEngine::complete, which ed-acp's
# local provider calls, arrived in 1.3.2.
onde = { version = "1.4.0" }
async-trait = "0.1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
Expand Down
2 changes: 2 additions & 0 deletions crates/ed-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ log.workspace = true
thiserror.workspace = true
tokio.workspace = true
futures-core = "0.3"
# std::time::Instant::now() panics on wasm32-unknown-unknown; web-time re-exports std on native.
web-time = "1"

[dev-dependencies]
tokio = { version = "1", features = ["macros", "rt", "sync"] }
Loading
Loading