Skip to content
This repository has been archived by the owner on May 9, 2022. It is now read-only.

Commit

Permalink
move index.html into example folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-Steiner committed Apr 28, 2021
1 parent 6d85084 commit a5ad9ed
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
21 changes: 13 additions & 8 deletions xayn-ai-ffi-wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,23 @@
- [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/)
- `rustup target add wasm32-unknown-unknown`

## Build
## Building the WASM module

`wasm-pack build`
```
wasm-pack build
```

## Test
## Running the WASM test

`wasm-pack test --node`
```
wasm-pack test --node
```

## Run in the browser
## Running the example

```
ln -s $(pwd)/../data/ $(pwd)/data
wasm-pack build --target web --release
```shell
ln -s $(pwd)/../data/ $(pwd)/example/data
wasm-pack build --target web --release --no-typescript --out-dir example/pkg
cd example
python3 -m http.server
```
1 change: 0 additions & 1 deletion xayn-ai-ffi-wasm/data

This file was deleted.

2 changes: 2 additions & 0 deletions xayn-ai-ffi-wasm/example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/data
/pkg
File renamed without changes.

0 comments on commit a5ad9ed

Please sign in to comment.