Skip to content
Closed
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
93 changes: 36 additions & 57 deletions Cargo.lock

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

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ repository = "https://github.com/hyperlight-dev/hyperlight-wasm"
readme = "README.md"

[workspace.dependencies]
hyperlight-common = { git = "https://github.com/hyperlight-dev/hyperlight", rev = "cfa020441d880d599cc516a050e6cf10236ca5c4", default-features = false }
hyperlight-component-macro = { git = "https://github.com/hyperlight-dev/hyperlight", rev = "cfa020441d880d599cc516a050e6cf10236ca5c4" }
hyperlight-component-util = { git = "https://github.com/hyperlight-dev/hyperlight", rev = "cfa020441d880d599cc516a050e6cf10236ca5c4" }
hyperlight-guest = { git = "https://github.com/hyperlight-dev/hyperlight", rev = "cfa020441d880d599cc516a050e6cf10236ca5c4" }
hyperlight-guest-bin = { git = "https://github.com/hyperlight-dev/hyperlight", rev = "cfa020441d880d599cc516a050e6cf10236ca5c4" }
hyperlight-host = { git = "https://github.com/hyperlight-dev/hyperlight", rev = "cfa020441d880d599cc516a050e6cf10236ca5c4", default-features = false }
hyperlight-common = { git = "https://github.com/hyperlight-dev/hyperlight", rev = "90e7221d2c4ebe4c5bca2e036fea3fad96c6dfdd", default-features = false }
hyperlight-component-macro = { git = "https://github.com/hyperlight-dev/hyperlight", rev = "90e7221d2c4ebe4c5bca2e036fea3fad96c6dfdd" }
hyperlight-component-util = { git = "https://github.com/hyperlight-dev/hyperlight", rev = "90e7221d2c4ebe4c5bca2e036fea3fad96c6dfdd" }
hyperlight-guest = { git = "https://github.com/hyperlight-dev/hyperlight", rev = "90e7221d2c4ebe4c5bca2e036fea3fad96c6dfdd" }
hyperlight-guest-bin = { git = "https://github.com/hyperlight-dev/hyperlight", rev = "90e7221d2c4ebe4c5bca2e036fea3fad96c6dfdd" }
hyperlight-host = { git = "https://github.com/hyperlight-dev/hyperlight", rev = "90e7221d2c4ebe4c5bca2e036fea3fad96c6dfdd", default-features = false }
hyperlight-wasm-macro = { version = "0.14.0", path = "src/hyperlight_wasm_macro" }
hyperlight-wasm-runtime = { version = "0.14.0", path = "src/hyperlight_wasm_runtime" }
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
channel = "1.94"
# Target used for guest binaries. This is an additive list of targets in addition to host platform.
# Will install the target if not already installed when building guest binaries.
targets = ["x86_64-unknown-none"]
targets = ["x86_64-unknown-none", "aarch64-unknown-none"]
10 changes: 8 additions & 2 deletions src/hyperlight_wasm/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.
// This is done by reading the hyperlight-wasm-runtime binary into a static byte array named WASM_RUNTIME.
// this build script writes the code to do that to a file named built.rs in the OUT_DIR.
// this file is included in lib.rs.
// The hyperlight-wasm-runtime binary is expected to be in the x64/{config} directory.
// The hyperlight-wasm-runtime binary is expected in the cargo-hyperlight target directory.

use std::fs::OpenOptions;
use std::io::Write;
Expand Down Expand Up @@ -167,8 +167,14 @@ fn build_wasm_runtime() -> PathBuf {
cmd.status()
.unwrap_or_else(|e| panic!("could not run cargo build hyperlight-wasm-runtime: {e:?}"));

let guest_target = match env::var("CARGO_CFG_TARGET_ARCH").as_deref() {
Ok("x86_64") => "x86_64-hyperlight-none",
Ok("aarch64") => "aarch64-hyperlight-none",
Ok(arch) => panic!("unsupported Hyperlight guest architecture: {arch}"),
Err(error) => panic!("CARGO_CFG_TARGET_ARCH is not set: {error}"),
};
let resource = target_dir
.join("x86_64-hyperlight-none")
.join(guest_target)
.join(profile)
.join("hyperlight-wasm-runtime");

Expand Down
Loading
Loading