microsoft / microsoft/node-api-dotnet
Embedded njs calling back into C#
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 783
- Forks
- 80
- PR merge metrics
- No merged PRs in 30d
Description
I am trialing this library as a replacement for a custom C#/njs embedding framework that we have in use right now. In order to work as a replacement, I need to both:
- Call from C# into the embedded njs environment
- Call from the embedded njs environment into C#
(Ideally with compile-time code generation)
I have managed to:
- get calls from nodejs into C# via the NPM node-api-dotnet
- get the embedded setup working (although the documentation is missing a few steps) calling C#->JS
But tossing nodejs.Import("node-api-dotnet") into a nodejs.Run throws exceptions.
Is bidirectional calling into/out of the embedded libnode possible? This is crucial for the project, so it will determine whether this library is viable for us.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the embedded setup and the failing nodejs.Import("node-api-dotnet") call inside nodejs.Run. Investigate whether bidirectional calls between embedded libnode and C# are supported, including the documented setup steps that are missing. Done means establishing feasibility and documenting the required approach or limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, javascript, nodejs
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100