Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
POC: Using WebAssembly build of libsass #2220
Not to be merged. More of proof of concept to illustrate high-level codeflows with pros & cons, and roadmaps to make it happen. This PR aims to provide proof-of-concept implementation of #2011, replaces current native libsass module into WebAssembly based binary.
How to run demo
you can see version information, and simplest sass compilation result.
Prebuilt binary exposes C interface of
Pros & cons
Roadmap (if this is a thing to go)
few things need to be evaluated. current wasm design so far at least doesn't have way to queue sync functions and control stack execution in async flow.
for emscripten side there's empreter which looks interesting, but that's something I haven't tried in this poc. I wouldn't say it's impossible forever, but safe to assume it'll be tricky.
@xzyfer example of empreter-based async flow execution : https://github.com/curiousdannii/emglken/blob/a98cc6c75d8214184afaeeb7f6ccbed0cd79e3af/emglken/library.js#L390-L414
referenced this pull request
Jan 20, 2018
It shouldn't have to be, if that's not desired.
Additional useful resource: https://github.com/medialize/sass.js/compare/feature/wasm