sass / dart-sass

The reference implementation of Sass, written in Dart.
https://sass-lang.com/dart-sass
MIT License
3.96k stars 360 forks source link

Implement `sass --embedded` in pure JS mode #2325

Open ntkme opened 2 months ago

ntkme commented 2 months ago

There has been a few requests for BSD support on the sass-embedded-host-ruby:

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:

nex3 commented 2 months ago

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 https://github.com/wasmerio/wasmer/issues/357), so that's another avenue that could be worth investigating.