-
Notifications
You must be signed in to change notification settings - Fork 365
Open
Labels
JavaScriptIssues particular to the Node.js distributionIssues particular to the Node.js distributionenhancement
Description
There has been a few requests for BSD support on the sass-embedded-host-ruby:
- Cannot create the gem on FreeBSD sass-contrib/sass-embedded-host-ruby#228
- sass-embedded fails to build on FreeBSD14 sass-contrib/sass-embedded-host-ruby#227
- nanoc-dart-sass does not install on FreeBSD 14 nanoc/nanoc#1710
- [Bug]: Impossible to use Jekyll on FreeBSD jekyll/jekyll#9462
- feat: OpenBSD support jekyll/jekyll#9493
The most reasonable solution seems to be implementing sass --embedded
in pure JS mode so that we can run embedded compiler using Node.js runtime on platforms that Dart runtime has no support. Aside from BSD, this will also allow users of some minor CPU architecture to run embedded host.
The pure JS implementation should be very similar to the current Dart implementation:
- Use synchronous compilation only for better performance.
- Use Node.js worker threads to replace Dart isolates.
- Use
SyncMessagePort
from embedded-host-node to replaceMailbox
.
Metadata
Metadata
Assignees
Labels
JavaScriptIssues particular to the Node.js distributionIssues particular to the Node.js distributionenhancement
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
nex3 commentedon Aug 30, 2024
I'm not opposed to this, and I'd definitely like to not be beholden to Dart's platform restrictions (which I've put some additional pressure on). Dart does also have increasingly real support for compiling to WASM, which might eventually make it possible to do this without a full Node.js runtime (if Wasmer ever adds GC support wasmerio/wasmer#357), so that's another avenue that could be worth investigating.
sass --embedded
in pure JS mode #2413