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

Embedded njs calling back into C# #393

Open
samueldcorbin opened this issue Oct 19, 2024 · 0 comments
Open

Embedded njs calling back into C# #393

samueldcorbin opened this issue Oct 19, 2024 · 0 comments

Comments

@samueldcorbin
Copy link

samueldcorbin commented Oct 19, 2024

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:

  1. Call from C# into the embedded njs environment
  2. Call from the embedded njs environment into C#

(Ideally with compile-time code generation)

I have managed to:

  1. get calls from nodejs into C# via the NPM node-api-dotnet
  2. 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.

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

No branches or pull requests

1 participant