Support for serving files alongside importable Val modules #21
maxmcd
started this conversation in
Feature Request
Replies: 1 comment
-
I also want this feature for authoring other type of files (ex: css stylesheets, html files) from val.town. I think it would pair really well with the upcoming new import types: denoland/deno_core#402 // WASM imports
import ffmpeg from "/ffmpeg.wasm" with { type: "wasm" };
// Binary blob imports
import image from "./image.jpg" with { type: "blob" };
// Plain text imports
import docs from "./docs.md" with { type: "text" };
// Reference URL
import styleUrl from "./style.css" with { type: "url" }; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I specifically want to host .wasm files that are available when importing a module from a url like: https://esm.town/v/maxm/untitled_crimsonSawfish
This would allow me to create/import vals with advanced wasm functionality that is typically only available through npm modules. I have wanted to create a Go/Zig/Rust frontend for vals that allows you to write code in those languages and then compiles them to webassembly. Potentially creating a path to better support for writing vals in languages that target webassembly.
I imagine this is a complex feature space because it opens up things like including html files or other supporting module files. The current system returns a single file and there is a beautiful simplicity to that.
Worth noting I can get around this today by storing the wasm in blob storage and creating an http val that acts like a module (I think this is possible!?). Considering that imports are likely heavily cached maybe this solution is perfectly fine! Although increasing the maximum size of the HTTP response might help with fat wasm binaries.
Beta Was this translation helpful? Give feedback.
All reactions