wapc / wapc-rust

Rust-based WebAssembly Host Runtime for waPC-compliant modules
Apache License 2.0
76 stars 10 forks source link

wapcurl? #22

Closed srenatus closed 3 years ago

srenatus commented 3 years ago

Hi!

Similar to grpcurl for grpc, a small utility that offers a way to invoke a wapc call via the command line would be useful for debugging and development... I'm imagining something like

wapcurl [-e engine] [-d payload] <wasm file> <function>

I wouldn't be surprised if this existed already, so I figured I'd ask. 🙂

autodidaddict commented 3 years ago

There is a command called wash that's part of wasmcloud that can do what grpcurl does and quite a bit more.

srenatus commented 3 years ago

Ah thanks, I've seen that but wasn't sure if it could work with plain wapc wasm modules. I'll have another look. 😃

autodidaddict commented 3 years ago

The only difference between a wapc module and a wasmcloud module is the embedded signature.

srenatus commented 3 years ago

Ah I see. I'll have to figure out how to embed one for my wasm modules then.

autodidaddict commented 3 years ago

You can use the wascap rust crate, which is what wasmcloud uses.

srenatus commented 3 years ago

FWIW https://github.com/jsoverson/wacl seems handy there, too. Almost the interface I had desired, except that it'll need signing, too.

autodidaddict commented 3 years ago

Yes wacl and wash are pretty similar.