home.social

#wasmer — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #wasmer, aggregated by home.social.

  1. WinterJS is a #JavaScript Service Workers server by the #Wasmer team that uses Firefox's #SpiderMonkey runtime to execute JavaScript.

    It follows the #WinterCG spec to aim for maximum compatibility with other services such as #Cloudflare Workers, #Deno Deploy and #Vercel.

    🔗 wasmer.io/posts/announcing-win

  2. Interesting. You can make calls back into #Python from #wasmer

  3. I like that CouchDB uses MapReduce to build its views. What I don't like is that its MapReduce functions are written in JavaScript and are slow.

    You do actually want good security isolation in the MapReduce functions. You want to be able to run untrusted views.

    So I want a fast and secure way of running MapReduce functions in the database thingy that I'm writing (in ).

    Correct me if I'm wrong, but is basically perfect for this use case, right? Should I start with ?

  4. Are there any WASI libraries that work? How do folks get WASM running in the browser? I recently tried to follow the wasmer tutorials which use a deprecated version of Parcel, tried to use the new version of Parcel, but found that the actual wasmer WASI library doesn't work.

    #wasmer #wasm

  5. @hywan Worked at #Wasmer Inc for some time after you left it, but didn't stay for a long time either. The team was great and has a high density of Know-How, but I also encountered issues with the CEO, and so did other team members. Had I read your blog post earlier, I wouldn't have joined. Very decent piece of software anyway.

    Still happy with the change in my career that happened by Wasmer hiring me back then, I wouldn't have given up my previous employment otherwise.

  6. and though _start was wrong, but the issue was another dynamic function, fun_fd_prestat_get, was returning None (aka []) and not a number (aka [I32]), but of course #wasmer decided NOT to inform you WHICH dynamic function was generating the runtime error.

    #WASM

  7. I sure manage to reach a lot of "unreachable" code in #wasmer. Hit another one, and have no clue what I'm doing since the docs aren't very clear.

  8. Interesting, I switched #wasmer 's compiler from llvm back to cranelift and both warnings went away.

  9. Always funny to get an error that is:
    RuntimeError: RuntimeError: unreachable

    Apparently the #wasmer devs thought something wasn't reachable, but I managed to reach it anyways, and I have no clue where this "unreachable" code is.

  10. Got the basics of an asyncio create_subprocess_exec-esque create_wasi async function working. Pass it a wasm file, and you can get the stdout, stderr.

    I am recreating the #WASI interface, as #wasmer 's just reuses the process's stdout which makes it not great for sandboxing.

    #WASM #Python

  11. @Perl @plicease's #WebAssembly in #Perl distribution metacpan.org/pod/Wasm (using #Wasmtime) now has competition in the form of Felipe Gasper's #Wasmer-based metacpan.org/pod/Wasm::Wasmer.

    With @PerlFFI's ability to build Perl extensions in C, C++, #Rust, #GoLang, #Pascal (!), #Fortran (!!), and even #assembly (!!!), you can plug just about any high-performance code into Perl.

    #programming #coding #SoftwareDevelopment

  12. ok, looks like bytearray copies the buffer instead of claiming the buffer as it's own, so I needed to use memoryview instead of bytearray to convert #wasmer 's buffer into one that ctypes can use.

    #Python #WASM

  13. And w/ a bit of magic, I can convert the #wasmer buffer into a ctypes buffer so more sane usage can come from this:
    (ctypes.c_uint32 * 10).from_buffer(bytearray(self.instance.exports.memory.buffer)[b:])

    Still need to do some magic for pointers, but b is a pointer, and don't have to do magic on calculating offsets.

  14. Did manage to get far enough to read the data written by #WASM program, but lots of cleanup is needed was the #wasmer API is bare bones and absolutely terrible. The ctypes interface is much better than this. At least it follows what you expect from C/assembly not this crazy made up idea of an API.

  15. #wasmer docs are absolute crap.

    I expected *_view offset to be in bytes, but they aren't. so now you have to divide the pointer provided by data length. Wonder if you can end up overwriting buffers you shouldn't by passing in non-aligned buffers to the WASM interpreter.

  16. And I guess I'm supposed to hashtag things or something. Relevant content above. Am I doing this right? #grainlang #wasm #wasmer #zig #ziglang

  17. More #wasmer weirdness. The WASI StateBuilder makes an ImportObject, but:
    /// This object is deprecated in favor of dictionaries in Python.

    Reading the source also lets me find out that you have to wrap functions for wasmer w/ it's own Function type.

    #WASM

  18. Python's dynamicness is awesome when using other Python code, but lots of interface code, like #wasmer 's Python interface don't follow the zen of python, which is allowing emulation via class interface, but requiring that it be a specific object, e.g. PyDict.

    #WASM

  19. Pretty clearly no one ACTUALLY followed the instructions for #WASM #Wasmer on Python in that example.

    missing import lines

    wasmBytes != wasm_bytes

  20. Die dritte Major-Version der Runtime verändert das Speichermanagement und kann WAPM-Pakete direkt ausführen und Executables für beliebige Plattformen erstellen.
    WebAssembly: Wasmer 3.0 erstellt native Executables für Windows, Linux und macOS
  21. > "#Wasmer can now turn a #WebAssembly file into a native Windows, Linux or Mac OS executable. This enables distributing executables to users, without requiring them to install Wasmer themselfes." :-)

    wasmer.io/posts/announcing-was

    #WASM #tech #code