A cargo subcommand to build & run Ruukh projects
Switch branches/tags
Clone or download
dependabot[bot] and csharad Bump serde from 1.0.80 to 1.0.82 (#22)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.80 to 1.0.82.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.80...v1.0.82)

Signed-off-by: dependabot[bot] <support@dependabot.com>
Latest commit 9af3445 Dec 12, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
CHANGELOG.md
Cargo.lock Bump serde from 1.0.80 to 1.0.82 (#22) Dec 12, 2018
Cargo.toml
LICENSE.md
README.md

README.md

Cargo Ruukh

A cargo subcommand to build & run Ruukh projects.

!! THIS IS HIGHLY UNSTABLE !!

Requirement

wasm-bindgen-cli is required by this CLI, so install it first if you do not have it already.

$ rustup target add wasm32-unknown-unknown
$ cargo +nightly install wasm-bindgen-cli

Installation

$ cargo install cargo-ruukh

Updation

$ cargo install -f cargo-ruukh

Build

Build in debug mode.

$ cargo ruukh build 

Build in release mode.

$ cargo ruukh build --release 

Run

Run the project in browser.

$ cargo ruukh run

Run the project in browser with watch mode.

$ cargo ruukh run --watch

Help

To see other options available in this CLI.

$ cargo ruukh -h

Template

The CLI uses a predefined template of html to run the project in the browser. You may override this template by placing index.html within the project folder. The template looks like this internally. Override this if you need it.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Your name</title>
</head>
<body>
    <div id="app"></div>
    <script src="static/$PACKAGE_NAME_JS$"></script>
    <script>
        wasm_bindgen("static/$PACKAGE_NAME_WASM$").then(() => wasm_bindgen.run());
    </script>
</body>
</html>

As you can see there are two extrapolation variables provided $PACKAGE_NAME_JS$ & $PACKAGE_NAME_WASM$.