# @doberan/sample_webassembly

> A sample project with wasm-pack

Latest version **0.1.0** (published 2019-07-08) · MIT/Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @doberan/sample_webassembly
pnpm add @doberan/sample_webassembly
yarn add @doberan/sample_webassembly
bun add @doberan/sample_webassembly
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2019-07-08 |
| First published | 2019-07-08 |
| Weekly downloads | 0 |
| License | MIT/Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 23.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | doberan |

## Links

- npm: https://www.npmjs.com/package/@doberan/sample_webassembly
- Repository: https://github.com/doberan/sample_webassembly
- Homepage: https://github.com/doberan/sample_webassembly#readme
- Issues: https://github.com/doberan/sample_webassembly/issues
- npm.io page: https://npm.io/package/@doberan/sample_webassembly

## Recent versions

- 0.1.0 (latest) — 2019-07-08

## README

# webAssembly実装サンプル

## 概要
最近流行りの（大分昔・・・）WebAssemblyをRustで実装してみた
参考は下記URLです。
https://developer.mozilla.org/ja/docs/WebAssembly/Rust_to_wasm

## 実際の流れ

### npmユーザ登録
```
$ npm adduser
Username: <NPM_USER_NAME>
Password:
Email: (this IS public) <NPM_USER_MAIL>
```

### リポジトリをクローン
```

$ git clone https://github.com/doberan/sample_webassembly.git
```

### ワーキングディレクトリ移動
```
$ cd ./sample_webassembly
```

### webAssemblyビルド用のcargoツールインストール
```
$ cargo install wasm-pack
```

### ビルド
```
$ wasm-pack build --scope <NPM_USER_NAME>
```

### アウトプットされたディレクトリに移動
```
$ cd pkg
```

### npmに公開
```
$ npm publish --access=public
```

### Webフロント実装
※下記リポジトリ内package.json, index.jsの@<NPM_USER_NAME>は書き換える必要がある
```
$ cd ../../
$ git clone https://github.com/doberan/sample_webassembly_alert.git
$ cd ./sample_webassembly_alert
$ npm install
$ npm run serve
```

---
_Source: https://npm.io/package/@doberan/sample_webassembly · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
