Code Monkey home page Code Monkey logo

plotters-wasm-demo's Introduction

Example Project of Plotters + WASM

This is a minimal project that uses Plotters in WASM application.

  • For more information about Plotters project, check our core repository.

  • This demo has been deployed at this link.

Try this example locally

To build the demo you need wasm-pack.

Then you can run it locally either using npm and webpack-dev-server or just with static web server.

The following script will install needed software and run the server via npm.

./start-server.sh

For Windows users without Bash, start-server.bat can be used to launch the server.

start-server.bat

Developing with NPM

Please use rust-wasm guide for initial setup . Then you can run the demo locally using npm:

wasm-pack build
cd www
npm install
npm start

This will start a dev server which will automatically reload your page whenever you change anything in www directory. To update rust code call wasm-pack build manually.

Developing without dependenices

If you don't want to use npm here's how you can run the example using any web server. We are using rust basic-http-server, but any web server will do.

# Install web server (instead you can use your local nginx for example)
cargo install basic-http-server
wasm-pack build --target web # Note `--target web`
basic-http-server

Then open http://127.0.0.1:4000/www

plotters-wasm-demo's People

Contributors

38 avatar tatrix avatar nuald avatar aaronerhardt avatar facorread avatar serzhiio avatar kongchenglc avatar ryanrussell avatar veykril 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.