sass / dart-sass

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

[feature request] Official Python bindings to replace `libsass-python` #2166

Closed vadimkantorov closed 9 months ago

vadimkantorov commented 9 months ago

I was enjoying a lot embedding some SASS processing (npm-less!) in my basic python SSG code. It would be great if new basic bindings appeared to supercede deprecated libsass and it current bindings libsass-python

There exists these outdated bindings, but it involves calling a subprocess and shipping a lot of binaries which is not very ideal https://pypi.org/project/dart-sass/

Maybe a Python package could embed a Dart VM (as in https://github.com/fuzzybinary/dart_shared_libray) and just call into the existing Dart bitcode

nex3 commented 9 months ago

We encourage community members to build and maintain wrapper packages in various languages. I recommend using the embedded Sass protocol for that.

vadimkantorov commented 9 months ago

Regarding a shim as in https://pypi.org/project/dart-sass/, it's still useful to have a pip-installable package that could resolve in runtime the correct platform. It might also interesting to have a single binary that does platform dispatch in runtime, akin to https://justine.lol/ape.html - me just back from the release page picking up the right tarball for my platform :)

nex3 commented 9 months ago

It would definitely be useful, but the Sass core team doesn't have the bandwidth to maintain more than one embedded host.