Skip to content
GitHub no longer supports this web browser. Learn more about the browsers we support.
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

Initial skeleton for N-API support. #440

Merged
merged 20 commits into from Sep 30, 2019
Merged

Initial skeleton for N-API support. #440

merged 20 commits into from Sep 30, 2019

Conversation

@dherman
Copy link
Collaborator

dherman commented Sep 12, 2019

First step towards N-API support. This PR is exploring an implementation strategy with scaffolding to build N-API support behind a feature flag ("napi-runtime"), allowing development to happen on master as we continue maintaining the existing codebase.

What I've implemented so far is almost nothing: it's barely enough to support creating an empty module that basically does nothing when it's loaded. But from here, we can split up the work into incremental, separate chunks.

@dherman dherman force-pushed the napi-skeleton branch from dae0393 to 7c00a74 Sep 13, 2019
@dherman dherman force-pushed the napi-skeleton branch 11 times, most recently from a35ed9e to e74ec5b Sep 19, 2019
@dherman dherman marked this pull request as ready for review Sep 21, 2019
@dherman dherman requested a review from kjvalencik Sep 21, 2019
@dherman

This comment has been minimized.

Copy link
Collaborator Author

dherman commented Sep 21, 2019

@kjvalencik I think this is ready for review now! If it would help I can leave in-place GitHub comments explaining what's going on in the PR.

@dherman

This comment has been minimized.

Copy link
Collaborator Author

dherman commented Sep 22, 2019

BTW my next step after we finish and merge this PR is to write a quest issue providing background, a task list, and documentation on how to contribute to the N-API port. My goal is to make the work as parallelizeable and as friendly to potential new contributors as possible.

@dherman dherman mentioned this pull request Sep 24, 2019
3 of 24 tasks complete
src/lib.rs Outdated Show resolved Hide resolved
@kjvalencik kjvalencik mentioned this pull request Sep 26, 2019
dherman added 6 commits Sep 12, 2019
- Move `extern "C"` definitions into neon-sys
- Enable dynamic symbol loading in macOS via neon-build so it happens even for `cargo build` in test/dynamic crate
- Remove dynamic symbol loading flag from `neon build` command since it's now in neon-build
- Use trybuild instead of compiletest for static tests to avoid stability issues
- No longer require Rust nightly since trybuild works for Rust stable
- Temporarily disable the package test until we publish a new version of neon-sys
…he Windows linkage info about neon-sys by saving them in text files from a build script within neon-build and then including them into constants.
dherman added 7 commits Sep 20, 2019
- neon-runtime and neon-sys can enable both backends simultaneously
- Create two mutually exclusive flags at top-level neon lib: napi-runtime and legacy-runtime
- Enforce mutual exclusion with a compile_error! error
- Disable all compiler warnings
- Use nodejs-sys for N-API C bindings
- Very simple wiring-up of napi_module_register
@dherman dherman force-pushed the napi-skeleton branch from 8c511e9 to 6d7cd7d Sep 27, 2019
@dherman dherman force-pushed the napi-skeleton branch 3 times, most recently from 0d81b01 to 9b45458 Sep 28, 2019
@dherman dherman force-pushed the napi-skeleton branch from 9b45458 to d6c30a8 Sep 30, 2019
dherman added 2 commits Sep 30, 2019
…tatic tests for all Rust versions except beta.
@dherman dherman merged commit 72e83f0 into master Sep 30, 2019
5 checks passed
5 checks passed
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
@dherman dherman deleted the napi-skeleton branch Sep 30, 2019
@amilajack amilajack mentioned this pull request Dec 8, 2019
2 of 2 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.