# Rainway SDK Node Bindings

These are the Node.js bindings for the Rainway SDK Native Runtime. See our [documentation](https://docs.rainway.com/) for more information.

Important note: This package will only function in Windows environments, as the Rainway SDK Native Runtime currently only supports Windows.

## Building

The bindings are automatically built by running `cargo build --features wrappers` in the `native` directory (`..\..`). See `build.rs` for more details.

You may need to [download Clang](https://releases.llvm.org/download.html) and put it on your PATH:

```ps1
# PowerShell
$env:PATH += ';C:\Program Files\LLVM\bin'
```

## Developing/testing

When developing the wrapper, if the C header did not change, you can use `npm run build` and `npm run test`.

To _really_ test your changes, check out [rainway-sdk-node-examples](https://github.com/RainwayApp/rainway-sdk-node-examples) and edit its `host-example/package.json` to have

```json
  "dependencies": {
    "@rainway/native": "file:C:\\rainway-sdk\\runtimes\\native\\target\\debug\\node"
  },
```

Then build `host-example` (see its README).
