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

How can I use this package? #9

Closed
aminya opened this issue Apr 10, 2021 · 14 comments
Closed

How can I use this package? #9

aminya opened this issue Apr 10, 2021 · 14 comments

Comments

@aminya
Copy link
Collaborator

aminya commented Apr 10, 2021

I wanted to use this package, but I have a couple of questions:

  • I could not find any examples in the repository. How should I write my Cmake file? and what is its relation with my Cmake-ts configuration?
  • Does Cmake-TS have a CLI tool that I need to call during building or installation?
  • How can I build for both Release and Debug without changing package.json?
  • Do you plan to add tests for this package?
  • Is there a tool like prebuildify or prebuild-install for this package?
  • Does it support N-API? The configuration in the readme uses NAN.

I was going to start a similar project, but I saw this repository. I think it has very good potential, and if we can solve the above questions, I will start to use it for a couple of native packages. I can help with the development of this repository!

@martin31821
Copy link
Member

That's a good point, i'll see whether I can add a full fledged example.

  • This package comes as a CLI tool, which needs to be invoked during the build step of a native addon.
  • Tests were planned, however not a priority right now.
  • No prebuildify is currently here.
  • We only support one build type at a time, what's your use case for having both?
  • We only support NAN at this time.

@aminya
Copy link
Collaborator Author

aminya commented Apr 11, 2021

This package comes as a CLI tool, which needs to be invoked during the build step of a native addon.

There was no documentation on this. We need should add those.

Tests were planned, however not a priority right now.

I think a minimal test is very important. Otherwise, it is always hard to change anything on the codebase.

No prebuildify is currently here.

That is not very hard to make. We can work on this.

We only support one build type at a time, what's your use case for having both?

I don't really need two builds at the same time, but I don't want to edit package.json. Maybe a flag should be passed to the CLI to specify the build type instead of the package.json entry

cmake-ts . --buildType Debug

This also allows testing both build types in the CI.

We only support NAN at this time.

Supporting N-api is very important. Without that, I cannot use CMake-ts. It is highly recommended to use N-api instead of NAN.

@martin31821
Copy link
Member

Agree on the first points, I like the build type override.

Unfortunately, nan is a bit hardwired at the moment, that's something we need to make more pluggable.
I agree to add n-api support, but I don't have an example library using n-api.

@aminya
Copy link
Collaborator Author

aminya commented Apr 11, 2021

I have an N-API library called Zadeh. I wanted to transfer this to Cmake-ts.

https://github.com/atom-community/zadeh

@aminya
Copy link
Collaborator Author

aminya commented Apr 28, 2021

I added NAPI support in #14. Although I have not tested it yet. If you can first try your NAN package with this branch, it would be great. Then, if it was working, I will go ahead and transfer Zadeh (which uses node-addon-api) to Cmake-ts.

@martin31821
Copy link
Member

I'll try it, looks good at first sight.

@aminya
Copy link
Collaborator Author

aminya commented May 15, 2021

@martin31821 Any news? Were you able to test #14?

If you can add one of the Cmake file examples you showed me in our meeting to the repository, it would be awesome. This also helps me to continue the development of this repository.

@aminya
Copy link
Collaborator Author

aminya commented Sep 6, 2022

A year later, I am still searching for a usage example.

@MrTob
Copy link

MrTob commented Jul 25, 2023

same here, pls help me. i want to migrate from cmake-js to cmake-ts
how to include the built ".node" file into an angular electron app?

@aminya
Copy link
Collaborator Author

aminya commented Oct 20, 2024

Hey @martin31821, I am still interested in making cmake-ts a successful project. I see that the project is unmaintained. Would you be interested in adding me as a maintainer?

I have managed to make a fully working example for zeromq.js. Take a look here:
zeromq/zeromq.js#665

@martin31821
Copy link
Member

martin31821 commented Oct 23, 2024 via email

@aminya
Copy link
Collaborator Author

aminya commented Oct 23, 2024

@martin31821 Sure, I'd be happy to help maintain this package. Now zeromq.js is relying on this.

Note that there's no need to transfer. I can continue the progress here if you send me an invitation to the repository.

@martin31821
Copy link
Member

@aminya i've invited you for maintainer access - I'll close this.

@aminya
Copy link
Collaborator Author

aminya commented Nov 20, 2024

Thanks for the invitation! I will start merging the patches.

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

3 participants