Skip to content

A convenient way to get the dart-sass-embedded for user #15

@ahabhgk

Description

@ahabhgk

For now, the main pain point of using this crate is the user needs to install the dart-sass-embedded into their app and pass the path to Sass::new, it is very inconvenient and needs the user knowing some sass knowledges and the source code of this crate to fully understand why they need to do that. So we need a convenient way to get the dart-sass-embedded for the user to let them don't need to worry about all the troubles or sass knowledges.

  • build script: a build script crate like prost_build, this build script crate will install the dart-sass-embedded and get the path where it installed at the build time. It's easy to implement, but the output can't be a single binary execution.
  • embed the dart vm: embed the dart vm into this crate, and load the .snapshot file as Vec<u8> at build time. This way the output can be a single binary execution, but the crate size will increase lots, and can't use the same dart vm/dart-sass-embedded when the user's project already using the dart vm/dart-sass-embedded.

The two ways is not mutually exclusive but complementary, the user can use cargo features to choose which way to use.

Tracking issue:

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions