{"id":13632617,"url":"https://github.com/connorskees/grass","last_synced_at":"2025-05-15T04:07:52.053Z","repository":{"id":44623642,"uuid":"231952983","full_name":"connorskees/grass","owner":"connorskees","description":"A Sass compiler written purely in Rust","archived":false,"fork":false,"pushed_at":"2024-09-07T21:51:38.000Z","size":3439,"stargazers_count":544,"open_issues_count":13,"forks_count":43,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-12T07:08:02.762Z","etag":null,"topics":["css","sass","sass-reimplemented","scss","web"],"latest_commit_sha":null,"homepage":"https://docs.rs/grass/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/connorskees.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-05T17:35:17.000Z","updated_at":"2025-05-01T09:00:35.000Z","dependencies_parsed_at":"2024-05-11T20:29:08.042Z","dependency_job_id":"f58ff2cc-3d9f-4869-8da8-8e79d8783aef","html_url":"https://github.com/connorskees/grass","commit_stats":{"total_commits":1800,"total_committers":23,"mean_commits":78.26086956521739,"dds":"0.32166666666666666","last_synced_commit":"05e3c94e001c3446823d365fc25a0a228ccd56e7"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connorskees%2Fgrass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connorskees%2Fgrass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connorskees%2Fgrass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connorskees%2Fgrass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/connorskees","download_url":"https://codeload.github.com/connorskees/grass/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254270656,"owners_count":22042860,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","sass","sass-reimplemented","scss","web"],"created_at":"2024-08-01T22:03:08.903Z","updated_at":"2025-05-15T04:07:47.042Z","avatar_url":"https://github.com/connorskees.png","language":"Rust","readme":"# grass\n\nThis crate aims to provide a high level interface for compiling [Sass](https://sass-lang.com/documentation/) into\nplain CSS. It offers a very limited API, currently exposing only 2 functions.\n\nIn addition to a library, this crate also includes a binary that is intended to act as an invisible\nreplacement to the Sass commandline executable.\n\nThis crate aims to achieve complete feature parity with the `dart-sass` reference\nimplementation. A deviation from the `dart-sass` implementation can be considered\na bug except for in the case of error messages and error spans.\n\n[Documentation](https://docs.rs/grass/)  \n[crates.io](https://crates.io/crates/grass)\n\n## Status\n\n`grass` has reached a stage where one can be quite confident in its output. For the average user there should not be perceptible differences from `dart-sass`.\n\nEvery commit of `grass` is tested against bootstrap v5.0.2, and every release is tested against the last 2,500 commits of bootstrap's `main` branch.\n\nThat said, there are a number of known missing features and bugs. The rough edges of `grass` largely include `@forward` and more complex uses of `@use`. We support basic usage of these rules, but more advanced features such as `@import`ing modules containing `@forward` with prefixes may not behave as expected.\n\nAll known missing features and bugs are tracked in [#19](https://github.com/connorskees/grass/issues/19).\n\n`grass` is not a drop-in replacement for `libsass` and does not intend to be. If you are upgrading to `grass` from `libsass`, you may have to make modifications to your stylesheets, though these changes should not differ from those you would have to make if upgrading to `dart-sass`.\n\n## Performance\n\n`grass` is benchmarked against `dart-sass` and `sassc` (`libsass`) [here](https://github.com/connorskees/sass-perf). In general, `grass` appears to be ~2x faster than `dart-sass` and ~1.7x faster than `sassc`.\n\n## Cargo Features\n\n### commandline\n\n(enabled by default): build a binary using clap\n\n### random\n\n(enabled by default): enable the builtin functions [`random([$limit])`](https://sass-lang.com/documentation/modules/math/#random) and [`unique-id()`](https://sass-lang.com/documentation/modules/string/#unique-id)\n\n### macro\n\n(disabled by default): enable the macro `grass::include!` for compiling Sass to\nCSS at compile time\n\n### nightly\n\n(disabled by default): currently only used by `grass::include!` to enable \n[proc_macro::tracked_path](https://github.com/rust-lang/rust/issues/99515)\n\n## Testing\n\nAs much as possible this library attempts to follow the same [philosophy for testing as\n`rust-analyzer`](https://internals.rust-lang.org/t/experience-report-contributing-to-rust-lang-rust/12012/17).\nNamely, all one should have to do is run `cargo test` to run all its tests.\nThis library maintains a test suite distinct from the `sass-spec`, though it\ndoes include some spec tests verbatim. This has the benefit of allowing tests\nto be run without ruby as well as allowing the tests more granular than they\nare in the official spec.\n\nHaving said that, to run the official test suite,\n\n```bash\n# This script expects node \u003e=v14.14.0. Check version with `node --version`\ngit clone https://github.com/connorskees/grass --recursive\ncd grass \u0026\u0026 cargo b --release\ncd sass-spec \u0026\u0026 npm install\nnpm run sass-spec -- --impl=dart-sass --command '../target/release/grass'\n```\n\nThe spec runner does not work on Windows.\n\nUsing a modified version of the spec runner that ignores warnings and error spans (but does include error messages), `grass` achieves the following results:\n\n```\n2023-07-09\nPASSING: 6230\nFAILING: 545\nTOTAL: 6905\n```\n\nThe majority of the failing tests are purely aesthetic, relating to whitespace\naround comments in expanded mode or error messages.\n\n## Versioning\n\nThe minimum supported rust version (MSRV) of `grass` is `1.70.0`. An increase to the MSRV will correspond with a minor version bump. The current MSRV is not a hard minimum, but future bugfix\nversions of `grass` are not guaranteed to work on versions prior to this.\n\n`grass` currently targets `dart-sass` version `1.54.3`. An increase to this number will correspond to either a minor or bugfix version bump, depending on the changes.\n","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnorskees%2Fgrass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconnorskees%2Fgrass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnorskees%2Fgrass/lists"}