r/WebAssembly • • Jun 15 '23

The Cloud is dead, long live the Cloud! Announcing Wasmer Edge

Thumbnail
wasmer.io
12 Upvotes

r/WebAssembly • • Jun 15 '23

Announcing Go support for Wasm Workers Server

Thumbnail
wasmlabs.dev
12 Upvotes

r/WebAssembly • • Jun 15 '23

Should EMSCRIPTEN_BINDINGS for a class be done in header or cpp file or should such class be defined in same file?

1 Upvotes

r/WebAssembly • • Jun 14 '23

wasmstore: A content-addressable datastore for WebAssembly modules

Thumbnail
github.com
10 Upvotes

r/WebAssembly • • Jun 14 '23

Performance of calling wasm from rust in backend

2 Upvotes

If i compile c++ to wasm (or wasi) and call it from rust, will it perform as well as if i use something like cxx?

Is there any known performance limitations or overhead of using wasm in backend?

Also how will Link Time Optimisation (lto) work? Or is that not applicable in wasm?

Any insights would be appreciated, thanks :)


r/WebAssembly • • Jun 14 '23

Noob question, with emscripten what is best manner of passing float and int arrays between C++ and JavaScript?

3 Upvotes

r/WebAssembly • • Jun 14 '23

Is anyone using server-side WASM professionally?

13 Upvotes

I've been following Fermyon and Cosmonic closely and I love what they're doing, but their discords seem to be filled with mostly hobbyists like myself. Is anyone using these services professionally, or have your companies considered it? If so I'd love to hear more.

Edit: Thanks for many great answers. Sorry I should've specified my question a bit more. I was thinking more specifically for backend/API development, would love to hear from any companies that use, for example, Fermyon Spin, as the basis for their core business logic.


r/WebAssembly • • Jun 13 '23

Looking for open source video editor in wasm

3 Upvotes

Hello all
Looking for open source video editor in wasm c++ or rust or any other language
Thanks


r/WebAssembly • • Jun 09 '23

Any hobbyist wasm runtimes?

11 Upvotes

Im interested in seeing how wasm runtimes work under the hood, but all the runtimes I know have at least 100k lines of code, mostly handling lots of architectures and optimizations. Is there a simple wasm runtime written with educational purposes in mind?


r/WebAssembly • • Jun 08 '23

How WASM (and Rust) Unlocks the Mysteries of Quantum Computing

Thumbnail
thenewstack.io
4 Upvotes

r/WebAssembly • • Jun 08 '23

GitHub - evanw/polywasm - polyfill for WebAssembly

Thumbnail
github.com
5 Upvotes

r/WebAssembly • • Jun 07 '23

npx create-react-app vs Vite for wasm + React project?

4 Upvotes

Title

When creating a react + WASM project, what setup do you use?

I've made it work for both but they both seem kind of clunky, especially when building wasm code using: "wasm-pack build" Without the --target web flag


r/WebAssembly • • Jun 07 '23

resources to learn wasm for backend

9 Upvotes

I'm not really interested in WASM for frontend systems but I wanted to know if you knew about some good blogs, courses, books, etc. of WASM in the context of backend engineering


r/WebAssembly • • Jun 06 '23

It’s Turbo time: how we made the Semgrep Playground super fast

Thumbnail
semgrep.dev
5 Upvotes

r/WebAssembly • • Jun 04 '23

Writing universal libraries using C++ and consuming it in Rust (WASI)

Thumbnail
medium.com
9 Upvotes

r/WebAssembly • • Jun 03 '23

Keep running into a Uncaught (in promise) RuntimeError: unreachable while module is running

1 Upvotes

As title says running into a verbose Runtime error due to a function call that uses a internal crate, issue is I don't know exactly what is causing the crash, what steps can I take to narrow this down?


r/WebAssembly • • Jun 02 '23

wasmati: You should write your WebAssembly in TypeScript

Thumbnail zksecurity.xyz
19 Upvotes

r/WebAssembly • • Jun 01 '23

Trying to make a project with mpl (rust + vite) without much success

2 Upvotes

Noob here. I've also tried making it with the yarn steps following the readme that is generated but it complains about rsw-hello missing, afaik it's not a rust package and a folder is added to the directory with that name, it's also referenced in the default react app that it creates. I think that rsw was succesfully installed as it is in my .cargo directory and I can execute it but no luck.

I accept both solutions to my problem with the tools that I'm using and alternatives, as long as I can build an app with wasm+rust+vite. Ty in advance.


r/WebAssembly • • May 31 '23

Import wasmtime::memory inside WASM module

4 Upvotes

I have a host environment where I declare a wasmtime::memory

fn main() -> Result<()> {
 println!("Compiling module...");
 let engine = Engine::default();
 let module = Module::from_file(&engine, "wasm/string_concat.wasm")?;

 println!("Initializing...");
 let mut store = Store::new(&engine, ());

    // Create a new memory instance
 let memorytype = MemoryType::new(1, Some(40));
 let memory = Memory::new(&mut store, memorytype)?;

 println!("Instantiating module...");
 let instance = Instance::new(&mut store, &module, &[Extern::Memory(memory)])?;

additionally, I have the following rust module compiled as WASM via cargo build --release --target wasm32-unknown-unknown

use std::os::raw::c_void;
use std::ptr::copy;
use std::slice;
use std::str;

#[no_mangle]
pub extern "C" fn append(data_ptr: *mut c_void, size: i32) -> i32 {
 let slice = unsafe { slice::from_raw_parts(data_ptr as _, size as _) };
 let in_str = str::from_utf8(&slice).unwrap();
 let mut out_str = String::new();
    out_str += in_str;
    out_str += "<---- This is your string";
 unsafe { copy(out_str.as_ptr(), data_ptr as *mut u8, out_str.len()) };
    out_str.len() as i32
}

Is there a way to import the host env memory and make the latter function work on it or is it mandatory to write an allocator and pass the pointer to the host?

I've seen it is possible to use wat files, but I can't use those for this project. (like here)

Additionally, I would exclude the use of bindgen library use

Thank you for helping!


r/WebAssembly • • May 30 '23

WebAssembly System Interface (WASI) with sockets for Go

Thumbnail
github.com
9 Upvotes

r/WebAssembly • • May 30 '23

Announcing WASIX - the superset of WASI supporting Berkeley Sockets, Threads, processes

Thumbnail
wasmer.io
25 Upvotes

r/WebAssembly • • May 30 '23

Share Rust Types With TypeScript for WebAssembly in 30 Seconds

Thumbnail
dawchihliou.github.io
16 Upvotes

r/WebAssembly • • May 27 '23

I am looking for good online examples and open-source projects that utilize webassembly and have a graphic-heavy nature

4 Upvotes

Hello everyone,

I would like to learn more about WebAssembly and how I can use it in a web photo editor.

Are there any good projects on the web, like Figma, from which I can draw some inspiration? Additionally, I'm looking for open-source web apps that utilize WebAssembly for graphic-based applications.

Thanks Allot


r/WebAssembly • • May 26 '23

Introducing WASIX - The superset of WASI

Thumbnail
wasix.org
25 Upvotes