Skip to content
Draft
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
5 changes: 2 additions & 3 deletions src/new/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ use std::path::{Path, PathBuf};
use anyhow::{Context, Result, ensure};
use clap::Parser;

const HYPERLIGHT_VERSION: &str = "0.15";
// TODO: support aarch64-hyperlight-none when aarch64 guests are supported.
const GUEST_ARCH: &str = "x86_64";
const HYPERLIGHT_VERSION: &str = "0.16";
const GUEST_ARCH: &str = std::env::consts::ARCH;

const GUEST_CARGO_TOML: &str = include_str!("guest/_Cargo.toml");
const GUEST_MAIN_RS: &str = include_str!("guest/_main.rs");
Expand Down
7 changes: 7 additions & 0 deletions tests/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,15 @@ fn new_host_and_guest() {

let guest_toml = std::fs::read_to_string(project.join("guest/Cargo.toml")).unwrap();
assert!(guest_toml.contains("name = \"myproject-guest\""));
assert!(guest_toml.contains("hyperlight-guest-bin = \"0.16\""));
let host_toml = std::fs::read_to_string(project.join("host/Cargo.toml")).unwrap();
assert!(host_toml.contains("name = \"myproject-host\""));
assert!(host_toml.contains("hyperlight-host = \"0.16\""));
let host_main = std::fs::read_to_string(project.join("host/src/main.rs")).unwrap();
assert!(host_main.contains(&format!(
"target/{}-hyperlight-none/debug/myproject-guest",
std::env::consts::ARCH
)));

// Clippy
run(cargo()
Expand Down
Loading