Skip to content
This repository has been archived by the owner. It is now read-only.
An experimental next-gen frontend framework for the Web in Rust.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.cargo Patch for proc-macro2 to use semver_exempted features (with --target)… Sep 10, 2018
codegen Now that the docs are available Oct 24, 2018
examples Fixed an example Jan 20, 2019
src Display impls are not used Oct 15, 2018
tests Upgrade to latest nightly Oct 7, 2018
.gitignore Redundant gitignore Aug 30, 2018
.travis.yml Everything is nightly Oct 15, 2018
CHANGELOG.md Display impls are not used Oct 15, 2018
Cargo.toml Now that the docs are available Oct 24, 2018
LICENSE Add LICENSE Aug 16, 2018
README.md Now that the docs are available Oct 24, 2018
rust-toolchain Set rust-toolchain to nightly Sep 27, 2018
rustfmt.toml

README.md

Ruukh - Frontend Web Framework

Crates.io Docs GitHub issues GitHub license Build Status

An experimental next-gen frontend framework for the Web in Rust. Write your web app in pure Rust.

Documentation (Master)

!! THIS IS HIGHLY UNSTABLE !!

Don't depend on this library for any of your production code. Also, this project does not make a guarantee that it will ever stabilize as there are a lot of issues to iron out. This project also might have breaking changes in patch version till 0.1.0. So, for the time being, this project is in a state of continuous experimentation.

Usage

Create a new library project as binary projects are not supported to run on WASM.

Add the following to your Cargo.toml:

[lib]
crate-type = ["cdylib"]

[dependencies]
ruukh = "0.0.3"
wasm-bindgen = "0.2.21"

Ruukh CLI

You may use cargo-ruukh to make your life easier to build and run Ruukh projects. It supports running your webapp in a development server.

To install it:

cargo install cargo-ruukh

For more information: read up the README at its own repo.

Code structure

The CLI to run your project effortlessly expects your code to be structured in a particular way. Also, mind that this library requires latest nightly to work.

In lib.rs with 2018 edition enabled:

#![feature(proc_macro_hygiene, decl_macro)]

use wasm_bindgen::prelude::*;
use ruukh::prelude::*;

#[component]
#[derive(Lifecycle)]
struct MyApp;

impl Render for MyApp {
    fn render(&self) -> Markup<Self> {
        html! {
            "Hello World!"
        }
    }
}

#[wasm_bindgen]
pub fn run() {
    App::<MyApp>::new().mount("app");
}

To check & see how the Ruukh app works, go to the Examples section and run those projects.


The project is licensed under MIT.

You can’t perform that action at this time.