ayysadmin/webc-cdn

wasi

Public
wasmer run ayysadmin/webc-cdn

webc-cdn

CDN for webc files. It fetches the webc url from the backend, and then fetches the webc file from the webc url. It then serves the webc file to the client. The webc file is cached locally.

The file is also optionally compressed with gzip by passing in the Accept-Encoding: gzip header.

TODO

  • Fetch the URL string from the backend. Right now, a hardcoded URL is used.
    • Fetch the latest version
    • Fetch a specific version when specified in the URL as /owner/package@version
  • Check if the webc file exists locally. If it does, serve it. If it doesn't, fetch it from the webc url and cache it locally.
  • Add support for range headers.
  • HEAD requests should return the content length and the content type.
  • make it run on wasmer. This should be easy because it uses the same depenencies as webc-server, and that already compiles to wasmer.
  • Send following headers in the response:
    • Content-Length
    • Content-Type
    • X-Content-SHA256
  • Don't make graphql query for header information if the file is already cached locally.

To run

cargo run

View logs

RUST_LOG=debug cargo run

A CDN for webc files from the wasmer registry

More packages
WebContainer implementation for wapm.io
A server for working with webc files.
watsuyo/wasmer-cdn website
watsuyo
watsuyo
watsuyo
watsuyo
CDN Wasmer starter package
CDN Wasmer starter package
CDN Wasmer starter package
Wasmer Edge as CDN sample
CDN Wasmer starter package
Syrus Akbary
Syrus Akbary
Syrus Akbary
Syrus Akbary
CDN Wasmer starter package
CDN Wasmer starter package

Making software universally accessible