Giter VIP home page Giter VIP logo

cargo-web's Introduction

Build Status

A cargo subcommand for the client-side Web

This cargo subcommand aims to make it easy and convenient to build, develop and deploy client-side Web applications written in Rust.

It's currently very early in development; for now it supports the following sub-subcommands:

  • cargo web build - builds your project
  • cargo web test [--nodejs] - automatically runs your tests in a web browser (experimental) or under Nodejs
  • cargo web start - builds the project, starts an embedded webserver and rebuilds as needed

It supports all three of Rust's Web backends when passed one of the following parameters:

  • --target-asmjs-emscripten - builds for asmjs-unknown-emscripten (default)
  • --target-webasm-emscripten - builds for wasm32-unknown-emscripten
  • --target-webasm - builds for Rust's native wasm32-unknown-unknown, requires Rust nightly

Before compiling anything you will have to install the corresponding targets with rustup yourself, e.g.:

$ rustup target add asmjs-unknown-emscripten

On i686 and x86_64 Linux it will also automatically download Emscripten for you when building for the *-emscripten targets.

It's also highly recommended that you check out the stdweb crate if you want to interact with the JavaScript world in your project.

Other features which are (eventually) planned but are yet not here:

  • Fully headless test running.
  • Feature parity with cargo.
  • Built-in minification.
  • Possibly a bridge into the npm ecosystem to fetch JavaScript libraries.
  • Anything else you might expect from a tool like this (suggestions welcome!).

Installation

$ cargo install cargo-web

To upgrade:

$ cargo install --force cargo-web

Or clone and build with $ cargo build --release then place in your $PATH.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

cargo-web's People

Contributors

bbatha avatar chrysn avatar everett1992 avatar koute avatar

Watchers

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