wasm-template-rust
A wasm ๐ธ template for Rust ๐ฆ to publish to gh-pages without npm-deploy
ํ์ผ ํ์๊ธฐ
์ต์ข ๋ฒ์ ๋ค์ด๋ก๋ (.zip)- ci.yml
- dependabot.yml
- travis_token.png
- lib.rs
- utils.rs
- create-wasm-app.js
- .gitignore
- bootstrap.js
- index.html
- index.js
- package.json
- webpack.config.js
- .gitignore
- .travis.yml
- Cargo.toml
- LICENSE-APACHE
- LICENSE-MIT
- README.md
# ์ค์น ๊ฐ์ด๋
1. ์ฝ๋ ๋ด๋ ค๋ฐ๊ธฐ
git clone https://github.com/sn99/wasm-template-rust
๊นํ๋ธ์์ ํ๋ก์ ํธ ์ฝ๋ ์ ์ฒด๋ฅผ ๋ด ์ปดํจํฐ๋ก ๋ด๋ ค๋ฐ์ต๋๋ค.
cd wasm-template-rust
๋ฐฉ๊ธ ๋ด๋ ค๋ฐ์ ํ๋ก์ ํธ ํด๋ ์์ผ๋ก ์ด๋ํฉ๋๋ค.
2. Node.js
์ฌ์ ์ถ์ฒ์ฌ์ ์ค๋น๋ฌผ
cd www
์ด ํ๋ก์ ํธ์ ๊ด๋ จ ํ์ผ์ด ํ์ ํด๋ ์์ ์์ด์, ๋จผ์ ๊ทธ ํด๋๋ก ์ด๋ํฉ๋๋ค.
npm install
package.json์ ๋ช ์๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ค์ ๋ด๋ ค๋ฐ์ ์ค์นํฉ๋๋ค.
npm start
๊ฐ๋ฐ/์คํ ์๋ฒ๋ฅผ ์ผญ๋๋ค.
๋ช
๋ น์ด ์คํ ํ ํฐ๋ฏธ๋์ ๋ํ๋๋ ์ฃผ์(๋ณดํต http://localhost:3000 ํํ)๋ฅผ ๋ธ๋ผ์ฐ์ ์์ ์ด์ด๋ณด์ธ์.
3. Rust
๋ณดํต์ฌ์ ์ค๋น๋ฌผ
- Git GitHub์์ ํ๋ก์ ํธ ์ฝ๋๋ฅผ ๋ด๋ ค๋ฐ์ผ๋ ค๋ฉด ํ์ํฉ๋๋ค.
- Rust (rustup) rustup์ผ๋ก ์ค์นํ๋ฉด cargo๋ ํจ๊ป ์ค์น๋ฉ๋๋ค.
"YOUR-PROJECT-NAME-SAME-AS-IN-CARGO.toml": "file:../pkg"
์ด ๋ช ๋ น์ด๋ฅผ ํฐ๋ฏธ๋์ ๊ทธ๋๋ก ์ ๋ ฅํด ์คํํ์ธ์.
cargo build๊ฐ ์๋ฌ ์์ด ๋๋๋ฉด ์ฑ๊ณต์
๋๋ค. target/ ํด๋์ ์คํ ํ์ผ์ด ์์ฑ๋ฉ๋๋ค.
์ด ๋ ํฌ์ README์ ์ ํ ์ค์ ๋ช ๋ น์ด๋ฅผ ๊ทธ๋๋ก ๊ฐ์ ธ์์ต๋๋ค.
// repository documentation
Was this content helpful?
(0 ratings)
