Skip to content

Commit e92b223

Browse files
committed
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 <joel.dice@fermyon.com>
1 parent 214128d commit e92b223

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ pub async fn componentize(
256256
let (my_resolve, world) = parse_wit(Path::new("wit"), world, features, all_features)
257257
.context(
258258
"no WIT files found; please specify the directory or file \
259-
containing the WIT world you wish to target",
259+
containing the WIT world you wish to target",
260260
)?;
261261
main_world = Some(world);
262262
my_resolve

src/stubwasi.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ pub fn link_stub_modules(
1414
libraries: Vec<Library>,
1515
) -> Result<Option<(Vec<u8>, impl Fn(u32) -> u32)>, Error> {
1616
let mut wasi_imports = HashMap::new();
17-
let mut linker = wit_component::Linker::default().validate(true);
17+
let mut linker = wit_component::Linker::default()
18+
.validate(true)
19+
.use_built_in_libdl(true);
1820

1921
for Library {
2022
name,

0 commit comments

Comments
 (0)