Giter VIP home page Giter VIP logo

draco's Introduction

Draco

Draco is a Rust library for building client side web applications with Web Assembly.

Draco implements a Redux and Elm inspired architecture. The core of a Draco application consists of two functions:

  • render: returns a description of what should be rendered on the screen. This description is efficiently applied to the browser's DOM with a minimal number of patches using Virtual DOM diffing.
  • update: receives a message and updates the state of the application. The application is re-rendered after every update.

Getting Started

There's a starter crate available here.

To run it, clone the repository:

$ git clone https://github.com/utkarshkukreti/draco-starter
$ cd draco-starter

and follow the instructions in its README.

Examples

Live Demo

There's not a lot of documentation present right now. If you want to learn more, the best way is to read the source code of the examples.

We recommend starting with Hello World, followed by Counter, and then Counters.

To build the examples, you'll need Ruby and wasm-bindgen-cli installed.

$ cd /path/to/this/repo
$ rake

Now start an HTTP server of your choice 1 and open target/examples/index.html in your browser to run the examples.

[1] Python 2/3's built in HTTP Server (and possibly others) does not work as browsers require .wasm files to be served with a MIME type of application/wasm which they do not do. Try serve if your HTTP server of choice does not work.

draco's People

Contributors

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