Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: add WebAssembly to primordials #36433

Closed
wants to merge 1 commit into from

Conversation

ExE-Boss
Copy link
Contributor

@ExE-Boss ExE-Boss commented Dec 7, 2020

This is used to handle support for WebAssembly modules and static analysis of named exports from CommonJS modules.


Note that adding WebAssembly types to /typings/primordials.d.ts depends on microsoft/TypeScript-DOM-lib-generator#959 in order to avoid adding lib: ["DOM"] to tsconfig.json.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added esm Issues and PRs related to the ECMAScript Modules implementation. tools Issues and PRs related to the tools directory. labels Dec 7, 2020
@ExE-Boss ExE-Boss force-pushed the lib/primordials/add-wasm branch 2 times, most recently from 623895e to f016a82 Compare December 10, 2020 19:58
@Trott
Copy link
Member

Trott commented Dec 12, 2020

Failures in GitHub CI (e.g., test-esm-wasm) seem related?

@ExE-Boss
Copy link
Contributor Author

I have no idea why:

const { WebAssemblyCompile } = primordials;
WebAssemblyCompile(...);

doesn’t work, but:

const { WebAssembly } = primordials;
WebAssembly.compile(...);

does.

@aduh95
Copy link
Contributor

aduh95 commented Dec 12, 2020

FWIW, it works on my machine™, I do not get the same error as the CI (all the tests pass). I compile with the --node-builtin-modules-path configure flag, that might be related.

@Trott Trott added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 23, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 23, 2020
@nodejs-github-bot
Copy link
Collaborator

@targos
Copy link
Member

targos commented Jul 11, 2021

@ExE-Boss would you like to rebase? Maybe it will work with the current V8 version

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@aduh95
Copy link
Contributor

aduh95 commented May 5, 2024

IIUC this is never going to work because of the --jitless flag:

// --jitless also implies --no-expose-wasm, see InitializeOncePerProcessImpl.

@aduh95 aduh95 closed this May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants