Add support for FreeBSD (x64 and arm64)#5698
Conversation
- Add FreeBSD entries in native.js and package.json - Add directories for npm module - Patch Cargo.toml and lib.rs to enable local-dynamic-tls for FreeBSD
It seems 4 is too many.
It appears the same trick as for Linux is necessary for FreeBSD.
It takes a long time, not convenient for test.
npm run ci:test:only exits with an error: [!] RollupError: Could not resolve "../../wasm/bindings_wasm" from "browser/src/initWasm.ts"
Test on x86-64 finished almost successfully (with one error).
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5698 +/- ##
==========================================
- Coverage 99.03% 99.01% -0.02%
==========================================
Files 257 257
Lines 8044 8046 +2
Branches 1357 1358 +1
==========================================
+ Hits 7966 7967 +1
Misses 52 52
- Partials 26 27 +1 ☔ View full report in Codecov by Sentry. |
|
This PR has been released as part of rollup@4.24.1. You can test it via |
|
I overlooked that the ARM build really is abysmally slow. Not sure I would want to keep it this way, for instance when publishing, everything is waiting for this one job for 15-20 minutes (still counting). Maybe it can be made faster by running on an actual ARM platform? But I did not look into details. After all, the x86 build is quite fast. |
|
Yes, FreeBSD arm64 build takes a long time (over 30-40 minutes) The last part of the blog post says GitHub will provide arm64 runners for open source projects by the end of the year. So I hope we can build for arm64 much faster eventually. |
|
But is it really necessary to use an arm64 platform to build for an arm64 platform? To my understanding, Rust is capable of cross-building to some degree? |
|
Yes, rust is indeed capable of cross-building for some target platforms. But FreeBSD arm64 platform is not (yet) supported as the target. An output from So we need a native platform for building an artifact for FreeBSD arm64 at the moment... |
|
Ok, thanks for the info. So for the time being, maybe we stick with the current setup and see how annoying it is. And then let's hope that the Arm64 will really become available for Open Source eventually. |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
This PR contains a set of changes necessary for building and publishing native binary for FreeBSD (x64 and arm64). Changes include:
build-freebsdjob to GitHub Actions workflowbuildjob, so add a dedicated jobWith those changes,
npm run test:onlyfinishes with the following output:One failuer is apparently due to underlying chokidar module. A similar change to chokidar solves the error and makes all tests pass.
I would much appreciate it if this PR is considered for inclusion for future releases.