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
4 changes: 0 additions & 4 deletions .github/workflows/Benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ jobs:
with:
rust-toolchain: "1.89"

- name: Build Wasm Runtime Binary
working-directory: ./src/hyperlight_wasm
run: just build-wasm-runtime ${{ matrix.config }}

- uses: dtolnay/rust-toolchain@1.89
with:
components: clippy, rustfmt
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/dep_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ jobs:
if: runner.os == 'Windows'
run: rustup component add --toolchain nightly-x86_64-pc-windows-msvc rustfmt

- name: Build Wasm Runtime Binary
working-directory: ./src/hyperlight_wasm
run: just build-wasm-runtime ${{ matrix.config }}

- name: Download Wasm Modules
uses: actions/download-artifact@v5
with:
Expand Down
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,10 @@
// This is needed to allow tests to find files when running under the debugger
"rust-analyzer.runnables.extraEnv": {
"RUST_DIR_FOR_DEBUGGING_TESTS": "${workspaceFolder}/src/hyperlight_wasm"
}
},

// Include wasm_runtime directory for rust-analyzer support
"rust-analyzer.linkedProjects": [
"${workspaceFolder}/src/wasm_runtime/Cargo.toml"
]
}
135 changes: 117 additions & 18 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ repository = "https://github.com/hyperlight-dev/hyperlight-wasm"
readme = "README.md"

[workspace.dependencies]
hyperlight-host = { version = "0.11.0", default-features = false, features = ["executable_heap", "init-paging"] }
hyperlight-host = { version = "0.12.0", default-features = false, features = ["executable_heap", "init-paging"] }
15 changes: 8 additions & 7 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ ensure-tools:
cargo install wasm-tools --locked --version 1.235.0
cargo install cargo-component --locked --version 0.21.1
cargo install wit-bindgen-cli --locked --version 0.43.0
cargo install cargo-hyperlight --locked

build-all target=default-target features="": (build target features) (build-wasm-examples target features) (build-rust-wasm-examples target features) (build-rust-component-examples target) (build-wasm-runtime target features)
build-all target=default-target features="": (build target features) (build-examples target features)

build target=default-target features="": (fmt-check)
cargo build {{ if features =="" {''} else if features=="no-default-features" {"--no-default-features" } else {"--no-default-features -F " + features } }} --verbose --profile={{ if target == "debug" {"dev"} else { target } }}
Expand All @@ -32,10 +33,9 @@ compile-wit:
wasm-tools component wit ./src/wasmsamples/components/runcomponent.wit -w -o ./src/wasmsamples/components/runcomponent-world.wasm
wasm-tools component wit ./src/component_sample/wit/example.wit -w -o ./src/component_sample/wit/component-world.wasm

build-wasm-runtime target=default-target features="":
cd ./src/wasm_runtime && cargo build --verbose {{ if features =="" {''} else if features=="no-default-features" {"--no-default-features" } else {"--features " + features } }} --profile={{ if target == "debug" {"dev"} else { target } }} && rm -R target
build-examples target=default-target features="": (build-wasm-examples target features) (build-rust-wasm-examples target features) (build-rust-component-examples target features)

build-wasm-examples target=default-target features="": (compile-wit)
build-wasm-examples target=default-target features="": (compile-wit)
{{ build-wasm-examples-command }} {{target}} {{features}}

build-rust-wasm-examples target=default-target features="": (mkdir-redist target)
Expand All @@ -54,7 +54,7 @@ check target=default-target:
cargo check --profile={{ if target == "debug" {"dev"} else { target } }}
cd src/rust_wasm_samples && cargo check --profile={{ if target == "debug" {"dev"} else { target } }}
cd src/component_sample && cargo check --profile={{ if target == "debug" {"dev"} else { target } }}
cd src/wasm_runtime && cargo check --profile={{ if target == "debug" {"dev"} else { target } }}
cd src/wasm_runtime && cargo hyperlight check --profile={{ if target == "debug" {"dev"} else { target } }}
cd src/hyperlight_wasm_macro && cargo check --profile={{ if target == "debug" {"dev"} else { target } }}

fmt-check:
Expand All @@ -79,7 +79,7 @@ clippy target=default-target: (check target)
cargo clippy --profile={{ if target == "debug" {"dev"} else { target } }} --all-targets --all-features -- -D warnings
cd src/rust_wasm_samples && cargo clippy --profile={{ if target == "debug" {"dev"} else { target } }} --all-targets --all-features -- -D warnings
cd src/component_sample && cargo clippy --profile={{ if target == "debug" {"dev"} else { target } }} --all-targets --all-features -- -D warnings
cd src/wasm_runtime && cargo clippy --profile={{ if target == "debug" {"dev"} else { target } }} --all-targets --all-features -- -D warnings
cd src/wasm_runtime && cargo hyperlight clippy --profile={{ if target == "debug" {"dev"} else { target } }} --all-targets --all-features -- -D warnings
cd src/hyperlight_wasm_macro && cargo clippy --profile={{ if target == "debug" {"dev"} else { target } }} --all-targets --all-features -- -D warnings

# TESTING
Expand All @@ -100,7 +100,8 @@ examples-ci target=default-target features="": (build-rust-wasm-examples target)
cargo run {{ if features =="" {"--no-default-features --features kvm,mshv3"} else {"--no-default-features -F function_call_metrics," + features } }} --profile={{ if target == "debug" {"dev"} else { target } }} --example metrics

examples-components target=default-target features="": (build-rust-component-examples target)
{{ wit-world }} cargo run {{ if features =="" {''} else {"--no-default-features -F " + features } }} --profile={{ if target == "debug" {"dev"} else { target } }} --example component_example
{{ wit-world }} cargo run {{ if features =="" {''} else {"--no-default-features -F kvm -F " + features } }} --profile={{ if target == "debug" {"dev"} else { target } }} --example component_example
{{ wit-world-c }} cargo run {{ if features =="" {''} else {"--no-default-features -F kvm -F " + features } }} --profile={{ if target == "debug" {"dev"} else { target } }} --example c-component

# warning, compares to and then OVERWRITES the given baseline
bench-ci baseline target="release" features="":
Expand Down
5 changes: 3 additions & 2 deletions src/hyperlight_wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ hyperlight-host = { workspace = true }
libc = { version = "0.2.178" }
once_cell = "1.21.3"
tracing = "0.1.43"
log = "0.4.29"
log = "0.4"
cfg-if = { version = "1" }
metrics = "0.24.3"
env_logger = "0.11.8"
Expand All @@ -74,7 +74,7 @@ windows = { version = "0.62", features = ["Win32_System_Threading"] }
page_size = "0.6.0"

[dev-dependencies]
hyperlight-component-macro = { version = "0.11.0" }
hyperlight-component-macro = { version = "0.12.0" }
examples_common = { path = "../examples_common" }
criterion = { version = "0.8.1", features = ["html_reports"] }
crossbeam-queue = "0.3"
Expand All @@ -101,6 +101,7 @@ built = { version = "0.8.0", features = ["chrono", "git2"] }
anyhow = { version = "1.0" }
goblin = "0.10.4"
tar = "0.4.44"
cargo-hyperlight = "0.1.4"

[target.'cfg(windows)'.build-dependencies]
junction = "1"
Expand Down
Loading