Reid D. M. · @arrdem
1240 followers · 4879 posts · Server macaw.social

Interesting. You can make calls back into from

#python #wasmer

Last updated 1 year ago

Ricardo · @rmdes
1126 followers · 4841 posts · Server mstdn.social

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 ?

#rust #wasm #wasmer

Last updated 1 year ago

adingbatponder :mastodon: · @adingbatponder
148 followers · 1222 posts · Server fosstodon.org
John-Mark Gurney · @encthenet
359 followers · 1348 posts · Server flyovercountry.social

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 decided NOT to inform you WHICH dynamic function was generating the runtime error.

#wasmer #wasm

Last updated 2 years ago

John-Mark Gurney · @encthenet
357 followers · 1318 posts · Server flyovercountry.social

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

#wasmer

Last updated 2 years ago

John-Mark Gurney · @encthenet
356 followers · 1310 posts · Server flyovercountry.social

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

#wasmer

Last updated 2 years ago

John-Mark Gurney · @encthenet
357 followers · 1278 posts · Server flyovercountry.social

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

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

#wasmer

Last updated 2 years ago

John-Mark Gurney · @encthenet
357 followers · 1276 posts · Server flyovercountry.social

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 interface, as 's just reuses the process's stdout which makes it not great for sandboxing.

#wasi #wasmer #wasm #python

Last updated 2 years ago

Mark Gardner · @mjgardner
256 followers · 360 posts · Server social.sdf.org

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

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

#webassembly #perl #wasmtime #wasmer #rust #golang #pascal #fortran #assembly

Last updated 2 years ago

John-Mark Gurney · @encthenet
355 followers · 1252 posts · Server flyovercountry.social

ok, looks like bytearray copies the buffer instead of claims the buffer as it's own, so I needed to use memoryview instead of bytearray to conver 's buffer into one that ctypes can use.

#wasmer #python #wasm

Last updated 2 years ago

John-Mark Gurney · @encthenet
355 followers · 1244 posts · Server flyovercountry.social

And w/ a bit of magic, I can convert the 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.

#wasmer

Last updated 2 years ago

John-Mark Gurney · @encthenet
355 followers · 1243 posts · Server flyovercountry.social

Did manage to get far enough to read the data written by program, but lots of cleanup is needed was the 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.

#wasm #wasmer

Last updated 2 years ago

John-Mark Gurney · @encthenet
354 followers · 1240 posts · Server flyovercountry.social

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.

#wasmer

Last updated 2 years ago

Tom · @contextfree
227 followers · 203 posts · Server hachyderm.io

And I guess I'm supposed to hashtag things or something. Relevant content above. Am I doing this right?

#grainlang #wasm #wasmer #Zig #ziglang

Last updated 2 years ago

John-Mark Gurney · @encthenet
354 followers · 1229 posts · Server flyovercountry.social

More 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.

#wasmer #wasm

Last updated 2 years ago

John-Mark Gurney · @encthenet
355 followers · 1228 posts · Server flyovercountry.social

Python's dynamicness is awesome when using other Python code, but lots of interface code, like '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.

#wasmer #wasm

Last updated 2 years ago

John-Mark Gurney · @encthenet
355 followers · 1227 posts · Server flyovercountry.social

Pretty clearly no one ACTUALLY followed the instructions for on Python in that example.

missing import lines

wasmBytes != wasm_bytes

#wasm #wasmer

Last updated 2 years ago

Cyrille37 · @Cyrille37
118 followers · 543 posts · Server mamot.fr

> " can now turn a 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

#code #tech #wasm #webassembly #wasmer

Last updated 2 years ago

Announcing Wasmer 3.0
wasmer.io/posts/announcing-was
Hey friends, we have a brand new version of 🚀

#wasm #wasmer

Last updated 2 years ago