Skip to content

wini-rs/wini

Repository files navigation

Wini logo

Wini

Release CI status Documentation

A way to rethink front-end development ⚡

Page Layout / Middleware Component
#[page]
async fn page() -> Markup {
    html! {
        h1 {
            "My title"
        }
        main .bg-red {
            "Some content"
        }
    }
}
#[layout]
async fn layout(child: Markup) -> Markup {
    html! {
        header {
            "Welcome to Wini!"
        }
        (child)
    }
}
#[component]
async fn button() -> Markup {
    html! {
        button
            .btn-blue
            onclick="jsFn()"
        {
            "Blue button!"
        }
    }
}

🤔 What is wini ?

Wini is a set of templates written in Rust for building websites. Instead of using WebAssembly like other common Rust front-end frameworks, Wini templates rely on server-side rendering and when needed TypeScript. Other options are also available, like htmx, Alpine.js, and _hyperscript. (See the doc for htmx and Alpine.js.)

The goal of Wini is therefore to be fast ⚡, lightweight 🪶 and server-side 🌐 oriented.

Even though Wini doesn't use a JavaScript framework and relies purely on vanilla JavaScript, you still have the possibility of installing packages with bun and using them as static files.

✨ Features

🏁 Getting started

Installation

You can install Wini with cargo

cargo install wini

Create your first Wini project

After the installation of wini, you can create a new project with

wini init

📄 Documentation

All the documentation concerning the inner workings of wini and how to work with it are available at: https://wini.rocks/.

🚧 State

Even though Wini works, it's still in a very early state: Things might not always work as expected and there might be some breaking changes in the future; but if you are curious, and you want to help contribute to this project, you can still try it!