Live data from Hacker News

Spin 3.0 – open-source tooling for building and running WASM apps

fermyon.com

1–10 of 44 posts

Re: Spin 3.0 – open-source tooling for building and running WASM apps

#4

Purple and green some to have become the colors of dev tooling. I'm seeing that color scheme everywhere.

I can see that at least Vite also uses those colors.

In part inspired by terminal colors but purple (instead of black) makes it feel more modern and sophisticated.

Re: Spin 3.0 – open-source tooling for building and running WASM apps

#5

Component dependency is pretty wild and could massively simplify some complex apps

You still need to cross the JS FFI boundary for wasm, I don't think WebAssembly has a specification for cross language FFI directly between WebAssembly languages.

Re: Spin 3.0 – open-source tooling for building and running WASM apps

#6
post #5

Component dependency is pretty wild and could massively simplify some complex apps

You still need to cross the JS FFI boundary for wasm, I don't think WebAssembly has a specification for cross language FFI directly between WebAssembly languages.

Wasm components can talk to each other, you do not need the JS FFI boundary.

Re: Spin 3.0 – open-source tooling for building and running WASM apps

#7
Does anyone know what the simplest possible recipe for running a Python script in a WASM sandbox using Spin is?

I basically want to do something like this:

    my-sandbox-cli-tool 'print("hello world")
And have the snippet of Python code I provide run inside a WebAssembly container that runs one of the Python compiled to WASM builds (https://github.com/brettcannon/cpython-wasi-build for example) - with a time limit and restrictions on memory usage, and file system access, and network access.

I am on a continued quest to figure out the cleanest way to achieve this, I have so many projects I would want to build on top of this capability!

Re: Spin 3.0 – open-source tooling for building and running WASM apps

#8
post #6
post #5

Earlier quoted context omitted.

You still need to cross the JS FFI boundary for wasm, I don't think WebAssembly has a specification for cross language FFI directly between WebAssembly languages.

Wasm components can talk to each other, you do not need the JS FFI boundary.

Can you give an example? Say between a wasm component written in Rust and wasm component written in dart.

Re: Spin 3.0 – open-source tooling for building and running WASM apps

#9
post #8
post #6

Earlier quoted context omitted.

Wasm components can talk to each other, you do not need the JS FFI boundary.

Can you give an example? Say between a wasm component written in Rust and wasm component written in dart.

One of the biggest goals of the component model is that it doesn't matter what language your component is written in. Composition can happen anytime one component exports an interface and another component imports it. https://component-model.bytecodealliance.org/creating-and-co...

Re: Spin 3.0 – open-source tooling for building and running WASM apps

#10
post #7

Does anyone know what the simplest possible recipe for running a Python script in a WASM sandbox using Spin is? I basically want to do something like this: my-sandbox-cli-tool 'print("hello world") And have the snippet of Python code I provide run inside a WebAssembly container that runs one of the Python compiled to WASM builds ( https://github.com/brettcannon/cpython-wasi-build for example) - with a time limit and…

wasmtime works as long as you make sure to include the lib directory

    % wasmtime run --dir .::/ python.wasm -c 'print("hello world")'
    hello world 
disclaimer: I run a code execution API service (https://riza.io/playground) that does this and more (HTTP, packages, etc.)
Post reply on HN