-
Notifications
You must be signed in to change notification settings - Fork 963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch from Libsass to supported Sass implementation #1535
Comments
I'm following https://github.com/kaj/rsass and https://github.com/connorskees/grass to replace libsass but grass doesn't seem very active so most likely I'll switch to rsass once it can compile bootstrap. If it can compile bootstrap it's probably good enough for 99% of the sites. |
Is there any reason for wanting to use a rust based compiler instead of one based on dart? It feels like the rust based compilers will always be playing catch up with dart-sass. |
There's no way to FFI with Dart from Rust I believe? You would have to ship the dart-sass binary along with it and then there's no point doing that, people can just do npm install themselves. |
I've seen a lot of articles published about FFI between Dart/Flutter and Rust lately, but I haven't looked into it. I'm not here to convince you to use dart-sass though. I was just a bit curious. :) Side note: |
As far as I can see, this is just for Rust to be used in Flutter, which wouldn't be the scope of Zola; correct me if I'm wrong, of course.
Flutter is just a framework for a slew of platforms built on Dart; not all Dart or Flutter packages work on the opposite scope, actually. Afaik, Dart is in theory capable of being used in Rust (see
Fun fact: the version of Dart Sass on NPM is different from Dart Sass; it's compiled to JavaScript, instead of being a native bin. This would make build times (at least from my experience) considerably slower. I think using the native libraries are the best bet, with |
Has anyone compared grass and rsass? grass can compile bootstrap which is a huge plus in terms of general support. |
I vote for |
Gonna keep it here until zola resolves: * getzola/zola#1535 See: https://bugs.gentoo.org/830657 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Alexey Zapparov <[email protected]>
Move ebuild to my personal overlay until zola switch from libsass to more up-to-date implementation: * getzola/zola#1535 The problem with sass-rs is that sass-sys build.rs is somewhat not fun to monkey-patch in order to make QA pass. Sorry about that. Closes: https://bugs.gentoo.org/830657 Signed-off-by: Alexey Zapparov <[email protected]>
There seems to be conflicting reports about the deprecation of libsass. Officially it's deprecated, but contrary to "only doing maintenance" releases, one of the maintainers has been actively back-porting Dart-Sass, and sharing progress reports in the release notes. https://github.com/sass/libsass/releases/ Like everything there's no timeline for the 4.0 release, but it appears word of libsass's death may have been premature. |
Yeah I've seen those updates but libsass is also a huge pain to build, especially on Windows - not to mention a very long compile time. Moving to grass/rsass would solve those issues while probably getting more features. |
If anyone is interested, I made a fork at https://github.com/rlee287/zola/tree/rsass where I switched to rsass, and which I chose because it was easier to port the existing code to use it. I was successfully able to use the "zhuia" theme with this fork, along with customizing it a bit using I can open a PR with this module change if you'd like that. |
Sweet, it seems pretty straightforward. I probably need to look at rsass and see if i can reduce the deps a bit, so probably for 0.17 |
Will this allow to use the built-in sass modules like |
I don't know if there's a list of missing features compared to the original impl |
It looks like https://github.com/connorskees/grass now supports the indented syntax and has a good coverage of dart-sass features. |
I've pushed grass support replacing libsass to the |
I tried it and it works fine for me. I was able to remove all my uses of |
it works fine, great! |
I've just tried using it for a website I'm trying to port to Zola and it does seem to support Sass very well. It even supports the new |
Libsass is deprecated, and only gets maintenance updates. The Sass team recommends people move to Dart Sass instead. It's still fast, compiles to one binary, and, as aforementioned, is being supported and updated. It would be a nice thing to consider
The text was updated successfully, but these errors were encountered: