arturo
arturo copied to clipboard
[Helpers/datasource] could we "download" files in Web mode?
[Helpers/datasource] could we "download" files in Web mode? perhaps using Fetch? see: https://nim-lang.org/docs/jsfetch.html
https://github.com/arturo-lang/arturo/blob/04e57a1a8d6bcaf8fdb4003e0893ca35cc4ee90e/src/helpers/datasource.nim#L44
proc getSource*(src: string): DataSource {.inline.} =
when not defined(WEB):
# TODO(Helpers/datasource) could we "download" files in Web mode?
# perhaps using Fetch?
# see: https://nim-lang.org/docs/jsfetch.html
# labels: library, enhancement, web
when defined(PORTABLE):
if SymExists("_portable") and GetSym("_portable").d.hasKey("embed") and GetSym("_portable").d["embed"].d.hasKey(src):
return (GetSym("_portable").d["embed"].d[src].s, FileData)
ndex 1e792c4679..20bcef1600 100644
++ b/src/helpers/intrinsics.nim
08a5beb39f322095621b28cc6bd0412420839935