Hello. Everyone. I am founder of ASMNEXT(asmnext.com) team in South Korea.
The reason why I leave message here is that I decided to hold a small offline conference about WASM at 2 p.m, this Saturday KST/UTC+9 (this Friday 9 p.m./US West, Midnight/US East).
This conference will be held at a conference room called ASSEM, located near Gimpo International Airport in South Korea. (assemhotel.modoo.at)
The conference is for customers and developers interested in WASM in South Korea.
If there is a team interested in this conference, we would appreciate it if you could send us an introduction (video or document or whatever). I will mention the team that sent me the introduction at this conference. Email: wasm@catswords.net
Thanks, Regards.
I'm sorry. I wrote the incorrect email address in the first message. Send it to wasm@catswords.net. Thanks.
I successfully finished this conference! I'm sharing my presentation here. https://www.slideshare.net/gnh1201/2022-semiconference-about-wasm-edited-3
Hey guys I'm trying to get my head around wasi ... the code below works!
#[no_mangle]
pub extern fn greet() {
println!("hello world");
}
cargo build --target wasm32-wasi
wasmtime --invoke greet ./target/wasm32-wasi/debug/plugin.wasm
// hello world
however... whenever I try to do something more useful I get this error:
unknown import: `__wbindgen_placeholder__::__wbindgen_describe` has not been defined
Any idea what's wrong?
What I'm trying to do is the following:
use webbrowser;
#[no_mangle]
pub extern fn open() -> () {
if webbrowser::open("https://github.com").is_ok() {
println!("Worked...")
}
}
It compiles fine... but I'm not able to execute it due to the error above...
Wasm-bindgen only works in the browser. The webbrowser crate likely uses wasm-bindgen to access the window.open web api. Wasmtime doesn't implement any web api's as it is not a browser. Instead it implements WASI which is closer to a UNIX environment. WASI doesn't have any api for opening a web browser. If you use wasmtime as library rather than executable you could export your own api to open a webbrowser to the wasm module though.
The webbrowser create is to launch the default webbrowser installed on the user system... I'm not trying to run this on a browser, I noticed the difference between wasm-bindgen and wasi.. And following every example I could find it always fails as soon as I try to import any crate...
The webbrowser crate doesn't work with wasi. Only native and from within the browser itself. In the later case by using the window.open() javascript api through wasm-bindgen.
The difference between wasi and wasm-bindgen is that wasm-bindgen allows binding to browser api's when running inside a browser, while wasi allows using a unix like environment with files, sockets and terminal io when running outside of the browser.
Last updated: Dec 23 2024 at 12:05 UTC