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

bun-wasm fixes & improvements #4126

Merged
merged 5 commits into from Aug 12, 2023
Merged

bun-wasm fixes & improvements #4126

merged 5 commits into from Aug 12, 2023

Conversation

jhmaster2000
Copy link
Collaborator

What does this PR do?

  • Fix WASM build on Linux by unhardcoding mimalloc filename in Makefile
  • Fix most TS errors in bun-wasm, add missing types, stronger types
  • Add scripts to document the process of building bun-wasm
  • Improve usability of bun-wasm as a proper package:
    • init() can now be called with no args and will resolve to the default location of next to the built index.js
      • The url argument still exists to be used if overriding the default wasm file location is needed.
      • To use the default location and pass the other args such as heap size, null can be given as the url.
    • Split index.d.ts into index.d.cts and index.d.mts, these are exact copies of each other but are necessary for optimal editor intellisense compatibility, as it tries to map the output index.mjs and index.cjs files to definition files of matching extension.

There's also some more isolated bun-polyfills progress as I branched this branch from the bun-polyfills branch by accident but that should be fine. (no bun-types changes included this time)

How did you verify your code works?

Manual testing based on the bun-wasm/test/node.mjs file. (bun-wasm is not part of the test suite yet)

@jhmaster2000 jhmaster2000 added the wasm Something that related to WASM or WASI support label Aug 12, 2023
@Jarred-Sumner Jarred-Sumner merged commit 117cee5 into main Aug 12, 2023
11 checks passed
@Jarred-Sumner Jarred-Sumner deleted the bun-wasm-fixes branch August 12, 2023 01:20
@Jarred-Sumner
Copy link
Collaborator

nice

@github-actions
Copy link

@jhmaster2000 2 files with test failures on linux-x64-baseline:

  • test/js/third_party/esbuild/esbuild-child_process.test.ts
  • test/js/third_party/prisma/prisma.test.ts

View test output

#a2ff5f6f03526acdd68b2f8977e3395522a39f67

@github-actions
Copy link

@jhmaster2000 2 files with test failures on linux-x64:

  • test/js/third_party/esbuild/esbuild-child_process.test.ts
  • test/js/third_party/prisma/prisma.test.ts

View test output

#a2ff5f6f03526acdd68b2f8977e3395522a39f67

@github-actions
Copy link

@jhmaster2000 3 files with test failures on bun-darwin-aarch64:

  • test/js/bun/test/test-test.test.ts
  • test/js/node/watch/fs.watch.test.ts
  • test/js/third_party/esbuild/esbuild-child_process.test.ts

View test output

#a2ff5f6f03526acdd68b2f8977e3395522a39f67

@github-actions
Copy link

@jhmaster2000 6 files with test failures on bun-darwin-x64-baseline:

  • test/js/bun/spawn/spawn-streaming-stdin.test.ts
  • test/js/bun/spawn/spawn.test.ts
  • test/js/bun/sqlite/sqlite.test.js
  • test/js/third_party/esbuild/esbuild-child_process.test.ts
  • test/js/third_party/webpack/webpack.test.ts
  • test/js/web/timers/setTimeout.test.js

View test output

#a2ff5f6f03526acdd68b2f8977e3395522a39f67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasm Something that related to WASM or WASI support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants