GithubHelp home page GithubHelp logo

solo-steven / rustlycss Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 625 KB

css transformer build in rust

License: BSD 2-Clause "Simplified" License

Rust 89.28% JavaScript 3.60% TeX 7.12%
css css-generator css-parser postcss postcss-like

rustlycss's Introduction

rustlycss

rustlycss is a css transform tool builded in rust.Insipred by postcss, rustlycss accepts a relative loss syntax of css, provider developer write their own syntax transform to control css syntax.

Benchmark

benchmark run on personal computed (Macbook pro 2021, M1 pro chip), tool using tinybench for js and criterion for rust.

Parser

file bootstrap-reboot.css bootstrap.css tailwind-dark.css
size 7.4K 201K 5.8M
js 339.410us 7864.636 us 238.186616ms
rust 33.769us 826.08 us 24.122ms
~ 10.05x 9.5x 9.87x

Codegen

file bootstrap-reboot.css bootstrap.css tailwind-dark.css
size 7.4K 201K 5.8M
js 30.297us 967.256 us 47.220991ms
rust 3.4377us 133.63 us 4.2332ms
~ 8.81x 7.24x 11.15x

Codegen With Source Map

file bootstrap-reboot.css bootstrap.css tailwind-dark.css
size 7.4K 201K 5.8M
js 433.094us 10102.929 us 273.264262 ms
rust 9.779us 319.47 us 12.292ms
~ 44.28x 31.624x 22.23x

Syntax

Please to go /spec/spec.pdf for syntax production rule

ACKNOWLEDGEMENT

This project is deeply inspired by postcss and postcss-rs, thanks Andrey Sitnik and postcss-rs contributor.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.