@@ -53,8 +53,6 @@ pub async fn wasm_canary() -> anyhow::Result<()> {
5353 . expect ( "Current dir" )
5454 . join ( "aws_sdk_rust_lambda_canary_wasm.wasm" ) ;
5555
56- println ! ( "WASM BIN PATH: {wasm_bin_path:#?}" ) ;
57-
5856 // Create a Wasmtime Engine configured to run Components
5957 let engine = Engine :: new (
6058 wasmtime:: Config :: new ( )
@@ -66,9 +64,6 @@ pub async fn wasm_canary() -> anyhow::Result<()> {
6664 let component = Component :: from_file ( & engine, wasm_bin_path) ?;
6765
6866 // Create the linker and link in the necessary WASI bindings
69- // let mut linker: Linker<WasiHostCtx> = Linker::new(&engine);
70- // link_all_the_things(&mut linker);
71-
7267 let mut linker = Linker :: new ( & engine) ;
7368 wasmtime_wasi:: p2:: add_to_linker_async ( & mut linker) ?;
7469 wasmtime_wasi_http:: add_only_http_to_linker_async ( & mut linker) ?;
@@ -103,64 +98,6 @@ pub async fn wasm_canary() -> anyhow::Result<()> {
10398 Ok ( ( ) )
10499}
105100
106- /// This function adds all of the WASI bindings to the linker
107- // fn link_all_the_things(linker: &mut Linker<WasiHostCtx>) {
108- // //IO
109- // wasmtime_wasi::p2::bindings::io::poll::add_to_linker(linker, |cx| cx)
110- // .expect("Failed to link Poll");
111- // wasmtime_wasi::p2::bindings::io::error::add_to_linker(linker, |cx| cx)
112- // .expect("Failed to link Error");
113- // wasmtime_wasi::p2::bindings::io::streams::add_to_linker(linker, |cx| cx)
114- // .expect("Failed to link Streams");
115-
116- // //Random
117- // wasmtime_wasi::p2::bindings::random::random::add_to_linker(linker, |cx| cx)
118- // .expect("Failed to link Random");
119-
120- // //Clocks
121- // wasmtime_wasi::p2::bindings::clocks::monotonic_clock::add_to_linker(linker, |cx| cx)
122- // .expect("Failed to link Clock");
123- // wasmtime_wasi::p2::bindings::clocks::wall_clock::add_to_linker(linker, |cx| cx)
124- // .expect("Failed to link Wall Clock");
125-
126- // //Filesystem
127- // wasmtime_wasi::p2::bindings::filesystem::types::add_to_linker(linker, |cx| cx)
128- // .expect("Failed to link Filesystem Types");
129- // wasmtime_wasi::p2::bindings::filesystem::preopens::add_to_linker(linker, |cx| cx)
130- // .expect("Failed to link Filesystem Preopen");
131-
132- // //CLI
133- // wasmtime_wasi::p2::bindings::cli::environment::add_to_linker(linker, |cx| cx)
134- // .expect("Failed to link Environment");
135- // wasmtime_wasi::p2::bindings::cli::exit::add_to_linker(linker, |cx| cx)
136- // .expect("Failed to link Environment");
137- // wasmtime_wasi::p2::bindings::cli::stdin::add_to_linker(linker, |cx| cx)
138- // .expect("Failed to link Stdin");
139- // wasmtime_wasi::p2::bindings::cli::stdout::add_to_linker(linker, |cx| cx)
140- // .expect("Failed to link Stdout");
141- // wasmtime_wasi::p2::bindings::cli::stderr::add_to_linker(linker, |cx| cx)
142- // .expect("Failed to link Stderr");
143-
144- // // CLI Terminal
145- // wasmtime_wasi::p2::bindings::cli::terminal_input::add_to_linker(linker, |cx| cx)
146- // .expect("Failed to link Terminal Input");
147- // wasmtime_wasi::p2::bindings::cli::terminal_output::add_to_linker(linker, |cx| cx)
148- // .expect("Failed to link Terminal Output");
149- // wasmtime_wasi::p2::bindings::cli::terminal_stdin::add_to_linker(linker, |cx| cx)
150- // .expect("Failed to link Terminal Stdin");
151- // wasmtime_wasi::p2::bindings::cli::terminal_stdout::add_to_linker(linker, |cx| cx)
152- // .expect("Failed to link Terminal Stdout");
153- // wasmtime_wasi::p2::bindings::cli::terminal_stderr::add_to_linker(linker, |cx| cx)
154- // .expect("Failed to link Terminal Stderr");
155-
156- // //HTTP
157- // wasmtime_wasi_http::bindings::http::types::add_to_linker(linker, |cx| cx)
158- // .expect("Failed to link HTTP Types");
159- // wasmtime_wasi_http::bindings::http::outgoing_handler::add_to_linker(linker, |cx| cx)
160- // .expect("Failed to link HTTP Outgoing Handler");
161- // }
162-
163- // #[ignore]
164101#[ cfg( test) ]
165102#[ tokio:: test]
166103async fn test_wasm_canary ( ) {
0 commit comments