4 Star 2 Fork 0

Gitee 极速下载 / Ruukh

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/csharad/ruukh
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

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.

MIT License Copyright (c) 2018 Sharad Chand Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Ruukh —— Rust 语言编写的下一代前端 Web 框架 Rust 已将其目标设定为主要的 WASM 语言,并且在后端和前端 Web 中使用它会非常棒 展开 收起
Rust
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Rust
1
https://gitee.com/mirrors/Ruukh.git
git@gitee.com:mirrors/Ruukh.git
mirrors
Ruukh
Ruukh
master

搜索帮助