Skip to content

Commit

Permalink
Allow populating LinkerBuilder with WASI definitions out of the box (
Browse files Browse the repository at this point in the history
…#1030)

* use AddWasi trait to add WASI definitions

The trait can more easily be extended to also work with the wasmi::LinkerBuilder type.

* move AddWasi trait to preview_1 submodule

* implement AddWasi for Linker and LinkerBuilder

* re-export AddWasi trait
  • Loading branch information
Robbepop committed May 11, 2024
1 parent ffcd68f commit 5fb9fa9
Show file tree
Hide file tree
Showing 2 changed files with 746 additions and 690 deletions.
6 changes: 5 additions & 1 deletion crates/wasi/src/sync/mod.rs
Expand Up @@ -7,4 +7,8 @@ pub mod snapshots;
pub use wasi_cap_std_sync::*;

#[doc(inline)]
pub use self::snapshots::preview_1::add_wasi_snapshot_preview1_to_linker as add_to_linker;
pub use self::snapshots::preview_1::{
add_wasi_snapshot_preview1_to_linker as add_to_linker,
add_wasi_snapshot_preview1_to_linker_builder as add_to_linker_builder,
AddWasi,
};

0 comments on commit 5fb9fa9

Please sign in to comment.