(Following my cursed adventures trying to bundle wasm, pngs, exes, and more inside a deno executable)
Idk where in the roadmap this belongs, but I think there should eventually be some comptime embed tool. (Even the C lang added preprocessor support for #embed apparently)
Maybe something like @embedUint8Array, @embedUtf8, @embedAscii
let myImage = @embedUint8Array("./img.PNG")
let myConfig = @embedUtf8("config.toml")
Milestone: 0.3.0.
both me and dave are for this. Likely it'll just be @embed which embeds are byte array and you could always comptime it to whatever you want
named
@fetch
While I would be a fan of the simplicity. I feel like the caching behavior could be weird/unclear. If its https is it going to fetch it every time the code is compiled? If its local will it do it every time?
And for local stuff it just reads it every time?
I think the gameplan is have it cache forever for local stuff as well.