Stream: wasmtime

Topic: help


view this post on Zulip bwkam (Oct 25 2023 at 11:43):

Hi, can I ask for help with wasmtime here?

view this post on Zulip bwkam (Oct 25 2023 at 11:44):

I never used zulip before, so I'm not sure.

view this post on Zulip bwkam (Oct 25 2023 at 12:00):

well I think it is, so I'm very naive to WASM and never used it before. Basically, I have a Node.js project that I compiled to wasm with @fastly/js-compute, then I tried executing it with wasmtime but I'm having errors about missing imports

Error: failed to run main module `main.wasm`

Caused by:
    0: failed to instantiate "main.wasm"
    1: unknown import: `fastly_http_body::new` has not been defined

How would I go about fixing them?

view this post on Zulip bwkam (Oct 25 2023 at 12:01):

I'm not very sure how this stuff works.

view this post on Zulip Lann Martin (Oct 25 2023 at 12:29):

We are hard at work making these things all interoperable but we aren't there yet. For now you can try Fastly's Viceroy which uses wasmtime internally and provides Fastly-specific imports.

Viceroy provides local testing for developers working with Compute. - GitHub - fastly/Viceroy: Viceroy provides local testing for developers working with Compute.

view this post on Zulip bwkam (Oct 25 2023 at 12:31):

Lann Martin said:

We are hard at work making these things all interoperable but we aren't there yet. For now you can try Fastly's Viceroy which uses wasmtime internally and provides Fastly-specific imports.

Thanks, problem is that can't use viceroy because of licensing problems, and I'm trying to do it with only with wasmtime, not sure how.. tried looking at the source code but I can't find how exactly it's being utilized

view this post on Zulip Lann Martin (Oct 25 2023 at 12:45):

can't use viceroy because of licensing problems

Oh? Viceroy appears to use the same Apache 2 license as wasmtime itself...

view this post on Zulip bwkam (Oct 25 2023 at 12:54):

Oh, I didn't know that.... might be a problem, I'll probably need to look more into the license stuff.


Last updated: Oct 23 2024 at 20:03 UTC