Skip to content

sebmaz93/rust-wasm-canvas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust-wasm-canvas

This guide provides step-by-step instructions for setting up a Rust project to compile to WebAssembly (Wasm) and run it in an HTML file.

Prerequisites

Installation

Step 1: Install Rust

  1. Open your terminal.

  2. Run the following command to install Rust:

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    
  3. Install wasm-pack

    curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
    
  4. Build the project

    wasm-pack build --target web
    
  5. Serve the HTML file which includes the imported Script for ex: you can use python

    python3 -m http.server

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published