Closed ajbennet closed 1 year ago
Any updates on this? I m still facing this problem.
CC @peterhuene, who'll have the most insights here.
Unfortunately the demo and the implementation have drifted significantly.
@tschneidereit @alexcrichton what do we think about retiring this repo in favor of essentially copying the demo as a walkthrough into each wasmtime-<lang>
repo? That way the demo scenario could be considered an additional test case that could be tested in CI nearest the implementation.
@ajbennet thanks for reporting this to us! I'll see about updating the demo to work with the latest versions of Wasmtime and I'll let you know when it is fixed.
what do we think about retiring this repo in favor of essentially copying the demo as a walkthrough into each
wasmtime-<lang>
repo?
I think that makes a lot of sense!
👍
Sounds reasonable to me!
Thanks @peterhuene. Is there another link or sample that you can point me to, to try out wasmtime and explore it?
@ajbennet there isn't one, at least for .NET, that really utilizes WASI since full support for using the WASI implementation directly from Wasmtime was implemented a few months after this demo was created.
Even this markdown demo barely uses WASI since the stub implementation (which will no longer be required when I update the demo) doesn't actually do anything.
I'll see if I can come up with more samples in the Wasmtime for .NET that show off WASI too.
Thanks @peterhuene , I appreciate it. I am still new to WASI and trying to wrap my head around it, so forgive me if this is a dumb question. I was wondering if it makes sense to create cross platform client UI applications using WASI and WASM as the payload. So it runs in the browser and any machine regardless of the architecture etc. ? Has there been any efforts in that front?
Not a dumb question at all!
You could definitely emulate the Electron model with WASI and WebAssembly where a platform-specific native host abstracts away the UI interactions via imported functions and the remainder (i.e. the "application") is implemented in WebAssembly. Unlike Electron, though, you wouldn't be required to have a JavaScript engine to load the WebAssembly (Electron can do this now via V8's support for loading WebAssembly) but instead you could directly use a WebAssembly engine like Wasmtime.
One day there might even be a GUI module for WASI such that "GUI" WebAssembly applications would work in environments that provide such a WASI module, much like how a .NET application that references WinRT/WPF/Winforms works, but theoretically in a cross-platform way.
I personally don't know of any real efforts in this space as a lot of the focus has been more in the backend server space (i.e. disrupting the world of networked containers), but that doesn't mean there aren't any!
Thanks Peter, this is great. Appreciate your response. I ll keep exploring.
_Abi
From: Peter Huene notifications@github.com Sent: Tuesday, April 21, 2020 2:57:47 PM To: bytecodealliance/wasmtime-demos wasmtime-demos@noreply.github.com Cc: Abi Bennet abbennet@microsoft.com; Mention mention@noreply.github.com Subject: Re: [bytecodealliance/wasmtime-demos] Getting an error when I tried the dotnet demo on .net core 3.1 (#21)
Not a dumb question at all!
You could definitely emulate the Electron model with WASI and WebAssembly where a platform-specific native host abstracts away the UI interactions via imported functions and the remainder (i.e. the "application") is implemented in WebAssembly. Unlike Electron, though, you wouldn't be required to have a JavaScript engine to load the WebAssembly (Electron can do this now via V8's support for loading WebAssemblyhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fanderejd%2Felectron-wasm-rust-example&data=02%7C01%7Cabbennet%40microsoft.com%7C074c78a82f05468b383208d7e63f0747%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637231030690922527&sdata=145veqlqjDzBJEcBfASCy3oeJzQ6x54Q0Gu7pEKYE%2Fo%3D&reserved=0) but instead you could directly use a WebAssembly engine like Wasmtime.
One day there might even be a GUI module for WASI such that "GUI" WebAssembly applications would work in environments that provide such a WASI module, much like how a .NET application that references WinRT/WPF/Winforms works, but theoretically in a cross-platform way.
I personally don't know of any real efforts in this space as a lot of the focus has been more in the backend server space (i.e. disrupting the world of networked containers), but that doesn't mean there aren't any!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbytecodealliance%2Fwasmtime-demos%2Fissues%2F21%23issuecomment-617435226&data=02%7C01%7Cabbennet%40microsoft.com%7C074c78a82f05468b383208d7e63f0747%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637231030690922527&sdata=aO%2BlKpFhq5lIks%2BTVxqZ2OSfTmhTPVsPRWFQY1dC55U%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAX7SKF62WXMQTJXR6H6YN3RNYJFXANCNFSM4MLDKJQA&data=02%7C01%7Cabbennet%40microsoft.com%7C074c78a82f05468b383208d7e63f0747%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637231030690932520&sdata=K6uFa6nO5%2B99GnPluUftVYdsfkru%2FZdJL3XJo9%2FcuY8%3D&reserved=0.
I'm going to close out this issue in preparation for achiving this repository.
I followed all the steps in the tutorial, but I couldnt get it to run. Below is the error.
c:\wasmtime-demos\dotnet>dotnet run Unhandled exception. Wasmtime.WasmtimeException: Failed to bind function import 'wasi_snapshot_preview1.fd_write': the host does not contain a method with a matching 'Import' attribute. at Wasmtime.Bindings.Binding.BindFunction(FunctionImport import, IEnumerable`1 methods) at Wasmtime.Bindings.Binding.GetImportBindings(IHost host, Module module) at Wasmtime.IHost.GetImportBindings(Module module) at Wasmtime.Instance..ctor(Module module, IHost host) at Wasmtime.Module.Instantiate(IHost host) at WasmtimeDemo.Program.Main() in C:\Users\abbennet\workspace\wasi\wasmtime-demos\dotnet\Program.cs:line 20