Skip to content

Cmajor NodeJS Bindings #100

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

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

Cmajor NodeJS Bindings #100

wants to merge 4 commits into from

Conversation

Mudloop
Copy link

@Mudloop Mudloop commented May 9, 2025

First version of the nodejs bindings.

It currently doesn't include prebuilds. This would need to be added / integrated with CI

To test:

  • go to tools/CmajNodeBindings
  • run npm i or bun i
  • run npm run build or bun run build
  • try one of the test scripts:
    • node ./tests/basics.js
    • node ./tests/async.js
    • node ./tests/codegen.js

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm just looking at these C++ files and unsure about how much of them is auto-generated.. There are lots of things in here that I'd write a bit differently if I was doing it by hand, but clearly there's been some code-generation involved (but also clearly not all of it is generated..). Is it worth cleaning them up to match our coding style/standards?

Copy link
Author

Choose a reason for hiding this comment

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

There definitely was code generation involved (think I told you that before). I'm not a C++ programmer so I got some help.
It is currently fully functional, but definitely not clean. I wouldn't add it to Cmajor as is - it's a draft / proof of concept. Personally I think it's very useful, but it's up to you to decide if it's worth your time.

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