Skip to content

Commit 5ac5af2

Browse files
committed
fix: restore surrogate default in pyhl binary main()
Signed-off-by: danbugs <danilochiarlone@gmail.com>
1 parent acc9727 commit 5ac5af2

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

host/src/bin/pyhl.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,7 @@ fn fresh_seed() -> u128 {
620620
// -- main ---------------------------------------------------------------------
621621

622622
fn main() -> Result<()> {
623+
hyperlight_unikraft::pyhl::default_surrogate_count();
623624
let cli = Cli::parse();
624625
match cli.cmd {
625626
Command::Setup(args) => cmd_setup(args),

host/src/pyhl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ use crate::{Preopen, Sandbox};
5555
/// callers would pay on the very first sandbox. Pinning the default to 1
5656
/// drops that to ~7 ms. Callers (or the embedding binary) can still
5757
/// override by setting the env var before calling into `pyhl`.
58-
fn default_surrogate_count() {
58+
pub fn default_surrogate_count() {
5959
if std::env::var_os("HYPERLIGHT_INITIAL_SURROGATES").is_none() {
6060
// Safety: must be called before any sandbox is created and
6161
// before additional threads are spawned.

0 commit comments

Comments
 (0)