grass is very close to completion and is approaching a 1.0 release. The API is stable and there are very few deviations from the reference implementation.
That said, there is still a bit of work to be done before I would want to call grass fully feature-complete and having full parity with the reference implementation. In its current state I would argue that grass is suitable for virtually all users of Sass, though there are still a few pieces missing.
This is a rough outline of my thoughts for what to work on next for this project. A large part of the remaining work is to catch up with the new features dart-sass has added in the last year or so.
The Module System
@use and @forward have a really surprising level of depth and complexity. Right now very few Sass projects use the module system, but as people move away from libsass, I expect that number to increase. There are a large number of failing spec tests related to this and I'm aware of at least 1 project that fails to compile due to its mixing of @import, @use, and @forward. This bullet is just to solve all of the remaining failing spec tests
API
grass hasn't had a breaking change to its rust API in well over 2 years, and the API that exists currently is resilient to breaking changes. I consider this section largely feature complete, and unless new features are requested, grass will retain the same API it has currently in a 1.0 version.
I may want to add the ability to further configure grass::include! output options, but it should be possible to do so in a backwards-compatible way.
Features that rely on the internals of grass, such as Sass functions written in rust or AST traversal can be built through the internals crate grass_compiler.
Cosmetics
We differ from dart-sass in a number of ways that don't affect the semantics of the output, but do affect the byte-for-byte equality of the output. For the purposes of automated diffing, it would be nice to resolve these differences. Additionally, there are some places where I think grass can improve on things like error messages and error spans.
Devops
Performance
I've implemented benchmarking in connorskees/sass-perf. grass is ~2x faster than dart-sass for all but 1 benchmark. I have a branch currently that improves SassMaps to make them proper hash maps with amortized constant time lookup and insertion. This doesn't fully fix performance issues on this benchmark, but does bring us a little bit closer. The remaining work here is
An exploration into using Arc/Rc for all values improved performance on bootstrap by about 20-50%.
General compatibility
These are real issues that can affect the semantics of the outputted CSS or cause errors/crashes on valid input. In general, these are extremely rare issues that do not come up very often in practice, but they should be resolved before a final release
Misc
Future dart-sass compatibility
This section is intended to grow as dart-sass adds new features. As part of maintaining grass, new features and bug fixes must be periodically translated from dart-sass.
grassis very close to completion and is approaching a 1.0 release. The API is stable and there are very few deviations from the reference implementation.That said, there is still a bit of work to be done before I would want to call
grassfully feature-complete and having full parity with the reference implementation. In its current state I would argue thatgrassis suitable for virtually all users of Sass, though there are still a few pieces missing.This is a rough outline of my thoughts for what to work on next for this project. A large part of the remaining work is to catch up with the new features
dart-sasshas added in the last year or so.The Module System
@useand@forwardhave a really surprising level of depth and complexity. Right now very few Sass projects use the module system, but as people move away fromlibsass, I expect that number to increase. There are a large number of failing spec tests related to this and I'm aware of at least 1 project that fails to compile due to its mixing of@import,@use, and@forward. This bullet is just to solve all of the remaining failing spec testsAPI
grasshasn't had a breaking change to its rust API in well over 2 years, and the API that exists currently is resilient to breaking changes. I consider this section largely feature complete, and unless new features are requested,grasswill retain the same API it has currently in a1.0version.I may want to add the ability to further configure
grass::include!output options, but it should be possible to do so in a backwards-compatible way.Features that rely on the internals of
grass, such as Sass functions written in rust or AST traversal can be built through the internals crategrass_compiler.Cosmetics
We differ from
dart-sassin a number of ways that don't affect the semantics of the output, but do affect the byte-for-byte equality of the output. For the purposes of automated diffing, it would be nice to resolve these differences. Additionally, there are some places where I thinkgrasscan improve on things like error messages and error spans.a { /**/ }should emita { /**/ }. This is a featuredart-sasshas added in the last few monthsa > > b {}should not be emitted. This is again a very recent addition todart-sass@importrules above loud comments that were declared above them--foo: ...)dart-sass, though does not affect semanticsNaN, we do not printNaN's unit@mediaindentation bug that we had been emulating, so we should update our code as wellDevops
bulmain CIbootstrapin CIdart-sassdifferential fuzzing.grassis already quite regularly fuzzed for crashes, but differential fuzzing would let us find other kinds of bugsPerformance
I've implemented benchmarking in connorskees/sass-perf.
grassis ~2x faster thandart-sassfor all but 1 benchmark. I have a branch currently that improves SassMaps to make them proper hash maps with amortized constant time lookup and insertion. This doesn't fully fix performance issues on this benchmark, but does bring us a little bit closer. The remaining work here isRc/ArcRc/ArcAn exploration into using Arc/Rc for all values improved performance on bootstrap by about 20-50%.
General compatibility
These are real issues that can affect the semantics of the outputted CSS or cause errors/crashes on valid input. In general, these are extremely rare issues that do not come up very often in practice, but they should be resolved before a final release
@extendand selector changes have been made indart-sassthat we need to emulateinspect(..)dart-sass. Rust's stdlib float formatter is insufficient for our needsMisc
randomfeaturecommandlinein default features. Unfortunately seems blocked on Adddefaultfeatures for each [[bin]] rust-lang/cargo#10409 in order to not make this a breaking changeFuture dart-sass compatibility
This section is intended to grow as
dart-sassadds new features. As part of maintaining grass, new features and bug fixes must be periodically translated fromdart-sass.dart-sass)calc-like functions Calc functions implementation sass/dart-sass#1970