Skip to content

Commit

Permalink
set use_built_in_libdl in stubwasi.rs
Browse files Browse the repository at this point in the history
...which matches what we're doing in lib.rs and fixes "unresolved symbol"
errors.

Signed-off-by: Joel Dice <[email protected]>
  • Loading branch information
dicej committed Oct 28, 2024
1 parent 214128d commit e92b223
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/stubwasi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ pub fn link_stub_modules(
libraries: Vec<Library>,
) -> Result<Option<(Vec<u8>, 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,
Expand Down

0 comments on commit e92b223

Please sign in to comment.