5 ms·
This is an interesting approach, great work! For anyone that wants to check where the meat is at, is mostly in this file: https://github.com/irrio/semblance/bl
by syrusakbary 2y ago
This is an interesting approach, great work!
For anyone that wants to check where the meat is at, is mostly in this file: https://github.com/irrio/semblance/blob/main/src/wrun.c https://github.com/irrio/semblance/blob/main/src/wrun.c
Thinking out loud, I think it would have been a great idea to conform with the Wasm-C-API (https://github.com/WebAssembly/wasm-c-api https://github.com/WebAssembly/wasm-c-api) as a standard interface for the project (which most of the Wasm runtimes: Wasmer, V8, wasmi, etc. have adopted), as the API is already in C and it would make it easier to try for developers familiar with that API.
Note for the author: if you feel familiar enough with Wasm and you would like to contribute into Wasmer, we would also welcome any patches or improvements. Keep up the work work!
- oguz-ismail 2y ago> Wasmer > Installed-Size: 266 MB What the hell
- syrusakbary 2y agoIndeed, we need to improve further the base binary size! Most of the size comes from the LLVM backend, which is a bit heavy. Wasmer ships many backends by default, and if you were to use Wasmer headless that would be just a bit less than a Mb. If you want, you can always customize the build with only the backends that you are interested in using. Note: I've seen some builds of LLVM under 5-10Mb, but those require heavy customization. Is clear that we have still some work to do to reduce size on the general build!
- CyberDildonics 2y agoSo you are shipping all of llvm?
- dapperdrake 2y agoWell, if you want to just-in-time compile, then it seems like a compiler is one way to go. They are now in the size realm of Lisp and Smalltalk. Forth may lean towards the lighter side.
- CyberDildonics 2y agoLisp and Smalltalk are 266 MB? tcc is 100KB https://www.bellard.org/tcc/ https://www.bellard.org/tcc/
- lifthrasiir 2y agoTCC doesn't do much optimization in turn, while commercial implementations of Lisp and Smalltalk are surely much larger than that.
- CyberDildonics 2y agoI'm not sure what your point is. The person I replied to was justifying a 266MB binary by saying a compiler was included. Are you saying optimization would make tcc 2,660 times as big?
- lifthrasiir 2y agoThe point is that LLVM does much, much more than TCC and, while it is definitely possible that LLVM could have done that in a smaller binary, TCC is probably not a good thing to compare with because it only does a bare minimum. I should also note that LLVM is a cross-compiler by default...
- CyberDildonics 2y agoThe person I replied to just said it is 266MB because it includes a compiler, and that obviously isn't true. https://github.com/bytecodealliance/wasm-micro-runtime https://github.com/bytecodealliance/wasm-micro-runtime This says 4000 lines https://github.com/explodingcamera/tinywasm https://github.com/explodingcamera/tinywasm What are we talking about here? There is obviously no reason a wasm jit has to be 266 MB
- folmar 2y agoSqueak Smalltalk is 53 MB on Windows (excluding sources). 48 MB of that is the image with UI framework and so on, but it's not immediately easy to say which library/ui parts are core.
- deleted 2y ago[deleted]
- benatkin 2y agoUm, the author is clearly familiar enough with Wasm, but probably knows enough to know to avoid a company that tried to trademark WebAssembly. > understandable concerns about the fact we, Wasmer, a VC-backed corporation, attempted to trademark the name of a non-profit organization, specifically WebAssembly Acknowledgement of wrongdoing.
- kowlo 2y agoI hadn't heard about this - terrible.
- arjvik 2y agoRead the whole blogpost that quote was taken from: https://wasmer.io/posts/wasmer-and-trademarks-extended https://wasmer.io/posts/wasmer-and-trademarks-extended I don't think this is as much of a smoking gun as it is made out to be.
- dapperdrake 2y agoAttention is all we need.
- syrusakbary 2y ago"Mistakes teach us, forgiveness frees us" - ChatGPT (o3-mini) https://wasmer.io/posts/wasmer-and-trademarks https://wasmer.io/posts/wasmer-and-trademarks
- szundi 2y agoJust for defensive purposes obviously
- tondrej 2y agoafaik it's far from adopted by Wasmer. https://github.com/wasmerio/wasmer/issues/2615 https://github.com/wasmerio/wasmer/issues/2615 - stale then autoclosed
- syrusakbary 2y agoIt seems the issue was not up to date, thanks for pointing it out (just commented in Github to make it clear for future readers). Wasmer supports most of the Wasm-C-API, with some exceptions for APIs that are not that common to use: finalize, hostref and threads (tables just had some quirks on the implementation that we had to polish, but is generally implemented [1]). https://github.com/wasmerio/wasmer/blob/main/lib/c-api/tests/wasmer-c-api-test-runner/src/lib.rs#L105-L111 https://github.com/wasmerio/wasmer/blob/main/lib/c-api/tests... If you are interested in running any of these cases using Wasmer via the Wasm-C-API please let us know... it should be mostly trivial to add support! [1] https://github.com/wasmerio/wasmer/blob/main/lib/c-api/src/wasm_c_api/externals/table.rs https://github.com/wasmerio/wasmer/blob/main/lib/c-api/src/w...
- tondrej 2y agoThank you! I'll take a look...