Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract the runner module into its own crate #678

Merged
merged 6 commits into from
Jul 2, 2024
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
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,21 @@ jobs:
- name: Test
env:
CARGO_TARGET_WASM32_WASI_RUNNER: wasmtime --dir=.
run: cargo hack wasi test --workspace --exclude=javy-cli --exclude=javy-config --each-feature -- --nocapture
run: cargo hack wasi test --workspace --exclude=javy-cli --exclude=javy-config --exclude=javy-runner --each-feature -- --nocapture

- name: Test Config
run: cargo test --package=javy-config

- name: Test Runner
run: cargo test --package=javy-runner

- name: Lint
run: cargo clippy --workspace --exclude=javy-cli --target=wasm32-wasi --all-targets -- -D warnings
run: cargo clippy --workspace --exclude=javy-cli --exclude=javy-runner --target=wasm32-wasi --all-targets -- -D warnings

# We need to specify a different job for linting `javy-runner` given that
# it depends on Wasmtime and Cranelift cannot be compiled to `wasm32-wasi`
- name: Lint Runner
run: cargo clippy --package=javy-runner -- -D warnings

- name: Upload core binary to artifacts
uses: actions/upload-artifact@v4
Expand Down
13 changes: 13 additions & 0 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ members = [
"crates/cli",
"crates/test-macros",
"crates/config",
"crates/runner",
]
resolver = "2"

Expand All @@ -27,6 +28,8 @@ once_cell = "1.19"
bitflags = "2.5.0"
javy-config = { path = "crates/config" }
javy = { path = "crates/javy", version = "3.0.0" }
tempfile = "3.10.1"
uuid = { version = "1.8", features = ["v4"] }

[profile.release]
lto = true
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ test-core:
test-cli: core
CARGO_PROFILE_RELEASE_LTO=off cargo test --package=javy-cli --release --features=$(CLI_FEATURES) -- --nocapture

test-runner:
cargo test --package=javy-runner -- --nocapture

# WPT requires a Javy build with the experimental_event_loop feature to pass
test-wpt: export CORE_FEATURES ?= experimental_event_loop
test-wpt:
Expand All @@ -44,7 +47,7 @@ test-wpt:
test-config:
CARGO_PROFILE_RELEASE_LTO=off cargo test --package=javy-config -- --nocapture

tests: test-javy test-core test-cli test-wpt test-config
tests: test-javy test-core test-runner test-cli test-wpt test-config

fmt: fmt-quickjs-wasm-sys fmt-quickjs-wasm-rs fmt-javy fmt-apis fmt-core fmt-cli

Expand Down
5 changes: 3 additions & 2 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,18 @@ swc_core = { version = "0.92.8", features = [
wit-parser = "0.209.1"
convert_case = "0.6.0"
wasm-opt = "0.116.1"
tempfile = "3.10.1"
tempfile = { workspace = true }
clap = { version = "4.5.7", features = ["derive"] }

[dev-dependencies]
serde_json = "1.0"
uuid = { version = "1.8", features = ["v4"] }
lazy_static = "1.4"
serde = { version = "1.0", default-features = false, features = ["derive"] }
criterion = "0.5"
num-format = "0.4.4"
wasmparser = "0.209.1"
javy-runner = { path = "../runner/" }
uuid = { workspace = true }

[build-dependencies]
anyhow = "1.0.86"
Expand Down
Loading
Loading