wrapperup / creme Goto Github PK
View Code? Open in Web Editor NEWExperimental static asset bundler for Rust websites.
Experimental static asset bundler for Rust websites.
Having Tailwind support would be nice to have built-in. Leptos and Dioxus have it built-in in their tooling. Perhaps Tailwind's upcoming LightningCSS refactor would make this more trivial.
Currently, Creme just serves the CSS as-is, which works great for modern browsers already, so it's a low priority. This would also be a building block feature for supporting Sass and SCSS.
Since creme's bundler runs before any of your Rust source code is compiled, it has to copy over all assets, even if they're unused.
We could solve this by bundling the artifact files into a temp directory, and then making use of the asset!
macro to copy over only the assets that are called in the source. This probably also doesn't work for rust_embed
, since it also runs during this stage. This could affect build times, so this is only going to be for release builds.
Another solution is to basically grep all invocations of creme::asset!()
(or asset!()
if it's imported in the source). This has other caveats, but it fixes some of the problems in the previous solution.
All of the documentation exists mostly in the README currently, some of it could live in docs
Once tower-rs/tower-http#309 lands, it makes more sense that Creme uses this for both the dev server and embedded assets. Benefits are we get all the features of ServeDir (precompressed responses, built-in fallback, etc)
Basically, copy rust_embed
's functionality for release mode. If we can reuse that crate, then perfect.
Creme is currently not fairly modular under the hood, but a minor refactor could make it so. This would make it trivial to make extensions to automatically handle bundling htmx, Tailwind, etc. Since the main API is a builder, it be as simple as adding a trait implementation, so for eg.
Creme::new()
.tailwind()
.htmx()
...
More details are probably needed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.