|
|
2 years ago | |
|---|---|---|
| .. | ||
| README.md | 2 years ago | |
README.md
Embedded Sass Compiler
This directory contains the Dart Sass embedded compiler. This is a special mode of the Dart Sass command-line executable, only supported on the Dart VM, in which it uses stdin and stdout to communicate with another endpoint, the "embedded host", using a protocol buffer-based protocol. See the embedded protocol specification for details.
The embedded compiler has two different levels of dispatchers for handling incoming messages from the embedded host:
-
The
IsolateDispatcheris the first recipient of each packet. It decodes the packets just enough to determine which compilation they belong to, and forwards them to the appropriate compilation dispatcher. It also parses and handles messages that aren't compilation specific, such asVersionRequest. -
The
CompilationDispatcherfully parses and handles messages for a single compilation. EachCompilationDispatcherruns in a separate isolate so that the embedded compiler can run multiple compilations in parallel.
Otherwise, most of the code in this directory just wraps Dart APIs to communicate with their protocol buffer equivalents.