-
Notifications
You must be signed in to change notification settings - Fork 1
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
Packaging up js-quic for integration into Polykey #19
Conversation
The |
Also according to napi-rs/napi-rs#1412 (comment), in order to actually stop the generation of I've done this with:
This disables the default features and then re-enables This is because in the
There's no way to only disable a single feature. So I have to disable all default features and then re-activate what I want. So in this case I'm re-enabling After re-running the build, I can see there's no more |
The |
I think I will use If this file exists, it will be used. If it doesn't exist, it will look for it in the dependencies. The model for this is Then in each optional dependency we have:
Unlike lmdb, we will not have so many different variants. This is because we are using rust, and I don't think we will bother to release so many kinds. A single file could be Then it's just a matter of loading it either from That actually means if you just do The optional dependency packages will need to be automatically created during the releasing procedure. Note that if you run Now during the actual |
Also as with MatrixAI/TypeScript-Demo-Lib-Native#3, cross compiling is whole another thing. So I'll leave this out for now. In fact there's actually no cross-compilation in node-gyp anyway. I think the question is whether you can cross-compile across operating systems vs cross-compiling across CPU architectures. |
Ok I've made |
So the This can be used as the system that builds the subpackages and publishes them first before publishing the main package. In that case, there's an expectation that a prebuild has already occurred. We shall go into the So it should be:
I know that universal binary for macos is built from node-gyp, I'm not entirely sure how rust does it though. |
Seems like for darwin it might be more complicated: rust-lang/cargo#8875. For node-gyp, it was just a matter of adding an extra |
Looks like this was made available for Will need to investigate that to figure out how to build the macos one. |
I have 3 new scripts:
These 3 scripts produce a new workflow to building the native objects and bumping up the version in sync, and publishing the optional dependencies. The next step is to integrate the CI/CD code into js-quic as it is a bit different too... I'm also testing a new thing where the native object is the I need to rewrite the loading code to prefer native objects under the Testing all of this will also depend some what on all tests being done for this repo @tegefaulkes. |
Time to squash and rebase on master, then to test the CI/CD. |
393dae1
to
bbbd1e5
Compare
I've tested requiring the dependency It actually works in 2 cases:
I think So we will stick with |
I've updated the |
Need to flesh out the stub benches to generate some empty metrics for these to be filled out later. |
I'm going to start the process of manual pushing this to gitlab now. Will be testing on gitlab's CI/CD. I'm going to merge this into master first, and change the default branch to staging @tegefaulkes. |
fix: removed jetbrains from `shell.nix` fix: removed socket.ts scaffolding feat: added benches stub fix: `npm bin` has been deprecated, replaced with `$(npm root)/.bin` chore: all scripts seem to be working fix: updated `src/native/quiche.ts` to load from `prebuild/` then npm dependencies
6ddfddc
to
d6c547e
Compare
Description
This introduces the CI/CD flows we have for native packages, and produces Linux, Mac and Windows binaries.
Issues Fixed
Tasks
scripts/prebuild.js
.gitlab-ci.yaml
Final checklist