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

[DRAFT] New libNode API #405

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

vmoroz
Copy link
Member

@vmoroz vmoroz commented Dec 6, 2024

This PR implements C# bindings for the new libNode API defined in PR nodejs/node#54660.
More specifically, it wraps the code from this branch:
https://github.com/vmoroz/node/commits/libnode/v20.x/ since the PR is still in progress.

I am also working on the internal Microsoft ADO pipeline to ship the libnode as a Nuget package.
My hope is that it must be ready soon - I am waiting for some approvals.

This PR is a DRAFT. I may still need to do some changes to the code.
The changes may also happen to the new libnode C-API as I am learning about some of its limitations in this PR.
The goal of the initial DRAFT PR is to get the initial feedback on the overall approach for binding the new APIs.
Some of unit tests are still failing. I am going to fix them in the next few days.

@vmoroz vmoroz requested review from jasongin and Copilot December 6, 2024 23:55

Choose a reason for hiding this comment

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

Copilot reviewed 6 out of 20 changed files in this pull request and generated no suggestions.

Files not reviewed (14)
  • src/NodeApi/Runtime/NodejsPlatform.cs: Evaluated as low risk
  • src/NodeApi.DotNetHost/JSRuntimeContextExtensions.cs: Evaluated as low risk
  • bench/Benchmarks.cs: Evaluated as low risk
  • src/NodeApi/Runtime/NodejsRuntime.Embedding.cs: Evaluated as low risk
  • src/NodeApi/Runtime/TracingJSRuntime.cs: Evaluated as low risk
  • src/NodeApi/Runtime/NodeJSRuntime.cs: Evaluated as low risk
  • src/NodeApi/Runtime/JSRuntime.cs: Evaluated as low risk
  • test/GCTests.cs: Evaluated as low risk
  • test/NodejsEmbeddingTests.cs: Evaluated as low risk
  • src/NodeApi/Runtime/NodejsEmbeddingThreadRuntime.cs: Evaluated as low risk
  • src/NodeApi/NodeApiStatusExtensions.cs: Evaluated as low risk
  • src/NodeApi/Runtime/NodejsEmbeddingPlatform.cs: Evaluated as low risk
  • src/NodeApi/Runtime/NodejsEmbedding.cs: Evaluated as low risk
  • src/NodeApi/Runtime/NodejsEmbeddingRuntimeSettings.cs: Evaluated as low risk
Comments skipped due to low confidence (1)

src/NodeApi/Runtime/NodejsEmbeddingModuleInfo.cs:12

  • The property name NodeApiVersion should be renamed to NodeApiVersion to maintain consistency with the naming conventions used elsewhere in the codebase.
public int? NodeApiVersion { get; set; }
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.

1 participant