Skip to content

Implement sass --embedded in pure JS mode #2325

@ntkme

Description

@ntkme
Contributor

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:

  • Use synchronous compilation only for better performance.
  • Use Node.js worker threads to replace Dart isolates.
  • Use SyncMessagePort from embedded-host-node to replace Mailbox.

Activity

nex3

nex3 commented on Aug 30, 2024

@nex3
Contributor

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.

linked a pull request that will close this issue on Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    JavaScriptIssues particular to the Node.js distributionenhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @nex3@ntkme

      Issue actions

        Implement `sass --embedded` in pure JS mode · Issue #2325 · sass/dart-sass