Skip to content

mith-mmk/rust-rect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebAssembly Test

 四角をひたすら描くだけ。

 なぜ四角をひたすら描くだけのサンプルが居るのでしょうか?アニメーションや画像処理の基本になる部分が詰め込んであるからです。

コンパイル環境

npmはLatestでないとエラーが出る可能性があるので、ディストリビューションのNodeJSではなく最新版のLTSをインストールすること。

# Rust Install
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
rustup update
# Wasm pack
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
# Cargo generate
cargo install cargo-generate

# npm with nodejs LTS (Ubuntu) see https://github.com/nodesource/distributions
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm install npm@latest -g

#cargo-generate require pkg-config
sudo apt install pkg-config -y

ビルド

#build

wasm-pack build -t web

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE_APACHE
MIT
LICENSE_MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published