Open xosg opened 5 years ago
reason#4: msgpack supports almost 100 languages just EXCEPT webassembly... :)
You could built your own using emscripten pretty easily from the C/C++ implementation. Give it a shot, it would probably be a fun project :)
you mean with the same js api? should be easy to implement from the zetz port i'm working on atm if you still need it?
Anybody still looking at this? or is there a better alternative at this point?
You can build a webassembly with many languages, for example Razor is a webassembly framework for .Net, so you could use c# and my LsMsgPack lib to build a webassembly version.
However a loose webassembly MsgPack serializer/deserializer dos not make much sense on its own, it would typically do something with the data before communicating with the webpage.
The interaction between a webpage and webassembly is via javascript POST and GET... it's a local webserver hosted inside the webbrowser, and can offload processor intensive tasks to the client instead of doing it on the server (for example generating PDF files or manipulating bitmap images).
Webassembly is more like a virtual machine than a "language", and can be built in many languages, so the question is not really valid.
I'm not sure how a WebAssembly version with an emulation of the messagepack.js Api will benefit anyone. MessagePack is used to serialize and deserialize objects into byte streams. To use an WebAssembly implementation of MessagePack from JavaScript, you need to pass the objects between JavaScript and WebAssembly. Which usually means JSON serialization and parsing on the other side. So my guess is that any efficiency gains you might get by performing the MessagePack work in WebAssembly will be more than neutralized by the extra JSON roundtrip needed to pass the objects between JavaScript and WebAssembly space.
Of yourse, in case you use WebAssembly to run code of any "non-browser" language (like C / C++ / C# / Rust etc.), you should also use the MessagePack library for the given language.
Hey, hello Could u make a WebAssembly version of msgpack.js ? For 3 simple reasons: