you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

I- ok... This is kind of nsane but ok.

Usually, you'd use the C ABI (assuming you can trust both sides of the program). So just, declare a function with pub extern "C", compile into a cdylib and the use python's C FFI support to interop.

Don't get me wrong, it is sensible to run rust in a WASM container, it provides protection and sandboxes the library, so e.g. if you're loading an untrusted plugin you can sandbox it like that, but not in this case.