Conversation
|
@fmvilas @MikeRalphson do you have an idea how to publish parser C libraries so that we can pull it from the nodejs parser? What I'm thinking is to publish cparser libraries to a public place, then when installing dependencies for npm create a custom script to download those dependencies to local env. we could use travis or similar tool to build platform-specific C libraries but then we need a place to store it. maybe Github?? |
|
To the best of my knowledge, you can put them along with the npm package files. However, that would make the npm package very large and heavy to download, because you'll have all the platform binaries there. I've seen some packages have a compilation process during In any case, we could have all the binaries stored somewhere. Like you said, maybe a Github page and a CDN in front of it would be enough. |
|
That said, putting all the binaries in the package is not a bad idea as a first step. We can improve this part later. |
|
How is this going @rmelian? |
… code organization improvements.
|
Updated the description of the PR with the following: What?This creates an initial Node.js parser. It's a wrapper for the C shared object exported in the Go parser. NotesCurrently, the binaries for Windows, Mac (darwin), and Linux are included in the
Food for thought. |
|
developers will hate us if we make them to do this What about the idea of hosting ourselves the binaries and when compiling node we can crate a hook to download the corresponding binaries: I think you told me exatly this once. |
|
Yeah, forgot about this option too. We can have a pre-install hook that will download the right binary. Not sure, however, how will it affect people that want to run their CI systems without an Internet connection and using their own internal npm registry. |
|
Updated the description with your suggestion. Thanks, @rmelian! |
What?
This creates an initial Node.js parser. It's a wrapper for the C shared object exported in the Go parser.
Notes
Currently, the binaries for Windows, Mac (darwin), and Linux are included in the
bindirectory. This makes the package size increase a lot, which is fine for now but we should look for another option in the future. Here are my suggestions:npm installtime usingnode-gyp. This is the first approach that I've tried first but didn't succeed. The downside of this approach is that people will need to have Python and Xcode (Mac), gcc in Linux, etc.npm install) using apre-installhook. The downside is that we might have people wanting to use this package in an environment that's not connected to Internet and use their own internal npm registry, like some CI systems.Food for thought.