Thanks to visit codestin.com
Credit goes to github.com

Skip to content

AlleyPally/wini

 
 

Repository files navigation

Wini logo

Wini

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: &str) -> Markup {
    html! {
        header {
            "Welcome to Wini!"
        }
        (PreEscaped(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 integration docs for htmx and Alpine.js.

The goal of Wini is therefore to be fast, lightweight, and to handle the maximum number of things that can be handled on the server, server-side.

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 you would any JavaScript front-end framework.

For more information about how Wini works and how it handles logic; such as pages, components, middleware, routing and layouts, check: https://wini.rocks

Getting started

Installation

You can install Wini with cargo

cargo install wini

Alternatively, you can install Wini by downloading the binary (not recommended)

curl -fsSL https://wini.rocks/install | sh

Note

You need root access.

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!

About

Wini, a way to rethink front-end development

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 83.8%
  • Nushell 7.1%
  • Shell 4.5%
  • Just 1.6%
  • TypeScript 0.9%
  • JavaScript 0.8%
  • Other 1.3%