Skip to content

Commit 27cff20

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

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
@@ -581,6 +581,7 @@ fn fresh_seed() -> u128 {
581581
// -- main ---------------------------------------------------------------------
582582

583583
fn main() -> Result<()> {
584+
hyperlight_unikraft::pyhl::default_surrogate_count();
584585
let cli = Cli::parse();
585586
match cli.cmd {
586587
Command::Setup(args) => cmd_setup(args),

host/src/pyhl.rs

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

0 commit comments

Comments
 (0)