From e92b223731b7b12d03033478b90151c3e5468eb7 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Mon, 28 Oct 2024 10:15:36 -0600 Subject: [PATCH] set `use_built_in_libdl` in stubwasi.rs ...which matches what we're doing in lib.rs and fixes "unresolved symbol" errors. Signed-off-by: Joel Dice --- src/lib.rs | 2 +- src/stubwasi.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index ac333eb..d9b93ed 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -256,7 +256,7 @@ pub async fn componentize( let (my_resolve, world) = parse_wit(Path::new("wit"), world, features, all_features) .context( "no WIT files found; please specify the directory or file \ - containing the WIT world you wish to target", + containing the WIT world you wish to target", )?; main_world = Some(world); my_resolve diff --git a/src/stubwasi.rs b/src/stubwasi.rs index 902fcb1..5305bad 100644 --- a/src/stubwasi.rs +++ b/src/stubwasi.rs @@ -14,7 +14,9 @@ pub fn link_stub_modules( libraries: Vec, ) -> Result, impl Fn(u32) -> u32)>, Error> { let mut wasi_imports = HashMap::new(); - let mut linker = wit_component::Linker::default().validate(true); + let mut linker = wit_component::Linker::default() + .validate(true) + .use_built_in_libdl(true); for Library { name,