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

Commit

Permalink
move content to root readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-Steiner committed Apr 30, 2021
1 parent 11b33f8 commit 9379068
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 40 deletions.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,48 @@ Also `cargo-lipo` is needed:
cargo install --version 3.1.1 cargo-lipo
```

### WASM

#### Prerequisites

- [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/)
- `rustup target add wasm32-unknown-unknown`
- [nodejs](https://nodejs.org/en/) (only if you want to run the tests on nodejs)

#### Building the WASM module

```
wasm-pack build
```

#### Running the WASM test

**Browser**

```
wasm-pack test --firefox --chrome --safari --headless
```

Note:

In `Safari` you first need to [enable the WebDriver support](https://developer.apple.com/documentation/webkit/testing_with_webdriver_in_safari)
via `safaridriver --enable`, before you can run tests.

**nodejs**

```
wasm-pack test node -- --no-default-features --features=node
```

#### Running the example

```shell
cd xayn-ai-ffi-wasm
wasm-pack build --target web --release --no-typescript --out-dir example/pkg
cd example
python3 -m http.server
```

## License

This repository contains code from other software in the following
Expand Down
40 changes: 0 additions & 40 deletions xayn-ai-ffi-wasm/README.md

This file was deleted.

0 comments on commit 9379068

Please sign in to comment.