feat: Wasm module support (#26668)

Support for Wasm modules.

Note this implements the standard where the default export is the
instance (not the module). The module will come later with source phase
imports.

```ts
import { add } from "./math.wasm";

console.log(add(1, 2));
```
This commit is contained in:
David Sherret 2024-11-19 18:59:23 -05:00 committed by GitHub
parent 6b478cd0a3
commit 8be2bbf074
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
60 changed files with 401 additions and 46 deletions

View file

@ -1548,6 +1548,10 @@ impl CliOptions {
}) => Url::parse(&flags.module_url)
.ok()
.map(|url| vec![Cow::Owned(url)]),
DenoSubcommand::Doc(DocFlags {
source_files: DocSourceFileFlag::Paths(paths),
..
}) => Some(files_to_urls(paths)),
_ => None,
})
.unwrap_or_default();