GithubHelp home page GithubHelp logo

mylovetop / ruukh Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 39ba1b880e95435ab737193c85d3cf5d/ruukh

0.0 2.0 0.0 271 KB

An experimental next-gen frontend framework for the Web in Rust.

License: MIT License

Rust 100.00%

ruukh's Introduction

Ruukh - Frontend Web Framework

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

!! 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.

ruukh's People

Contributors

pepsighan avatar

Watchers

James Cloos avatar 默书 avatar

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.