Skip to content

test(node_napi): Add a Regression Test#34

Merged
viferga merged 3 commits into
metacall:masterfrom
k5602:master
Mar 24, 2026
Merged

test(node_napi): Add a Regression Test#34
viferga merged 3 commits into
metacall:masterfrom
k5602:master

Conversation

@k5602
Copy link
Copy Markdown
Contributor

@k5602 k5602 commented Mar 4, 2026

Adds tests for Node.js NAPI module support using rspack. This includes a new batch file for running the tests and JavaScript and command files for the Node.js NAPI test case. This test is expected to fail until MetaCall's node.dll properly re-exports napi_* symbols"hypo".

Adds tests for Node.js NAPI module support using rspack.
This includes a new batch file for running the tests and
JavaScript and command files for the Node.js NAPI test case.
This test is expected to fail until MetaCall's node.dll
properly re-exports napi_* symbols"hypo".
@k5602 k5602 force-pushed the master branch 2 times, most recently from 60f4a59 to 6cb18b1 Compare March 9, 2026 22:07
Comment thread test.bat Outdated
rem TODO: NAPI native addon support - napi_* symbols not re-exported by MetaCall's node.dll
rem TODO: https://github.com/metacall/distributable-windows/issues/
echo Npm Install rspack Test
call metacall npm install --prefix="%loc%\node_napi" @rspack/core
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix the rspack version

Comment thread test.bat Outdated
echo Node NAPI Tests
set "LOADER_SCRIPT_PATH=%loc%\node_napi"

rem TODO: NAPI native addon support - napi_* symbols not re-exported by MetaCall's node.dll
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you explain this?

Comment thread tests/node_napi/index.js Outdated

// Regression test for MetaCall NAPI native addon support.
// @rspack/core depends on @rspack/binding, a Rust-compiled NAPI addon (napi-rs).
// MetaCall's embedded node.dll must re-export all napi_* symbols for this to work.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all comments down here are wrong, kust link the pr in the core

@k5602
Copy link
Copy Markdown
Contributor Author

k5602 commented Mar 17, 2026

@viferga
this regression test actually for metacall/core#670
and it helped to reproduce the problem and it did.

@viferga viferga merged commit 46124f1 into metacall:master Mar 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants