You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is splitting off from #5683 as it far more than allowing the blob: protocol. This is because we do all the processing of modules/worker scripts inside Rust. This means we expect the specifier to be fully resolvable inside of Rust. For http/https URLs we go and fetch the resources in Rust. For file URLs we have a whole string which we can decode to provide us the module text. With Object URLs, the actual content is still located in JavaScript isolate/sandbox, so it means for these Object URLs, we need to serialise them to a string before passing them out to Rust and then deal with them there. This is more complex than simply passing out a string.
It also means it won't work for things like import and export, because these need to be fully statically analysed before they are loaded. We might be able to get it for dynamic import() but it would require doing some gymnastics in rusty_v8, because import() is syntax, not a runtime construct.
Because of all of these challenges it goes from "yeah sure, makes sense" to "hmmm... we need to think about it".
The text was updated successfully, but these errors were encountered:
Deno should support blob/Object URLs for workers.
For example the following should work:
This is splitting off from #5683 as it far more than allowing the
blob:
protocol. This is because we do all the processing of modules/worker scripts inside Rust. This means we expect the specifier to be fully resolvable inside of Rust. Forhttp
/https
URLs we go and fetch the resources in Rust. Forfile
URLs we have a whole string which we can decode to provide us the module text. With Object URLs, the actual content is still located in JavaScript isolate/sandbox, so it means for these Object URLs, we need to serialise them to a string before passing them out to Rust and then deal with them there. This is more complex than simply passing out a string.It also means it won't work for things like
import
andexport
, because these need to be fully statically analysed before they are loaded. We might be able to get it for dynamicimport()
but it would require doing some gymnastics in rusty_v8, becauseimport()
is syntax, not a runtime construct.Because of all of these challenges it goes from "yeah sure, makes sense" to "hmmm... we need to think about it".
The text was updated successfully, but these errors were encountered: