An open API service indexing awesome lists of open source software.

https://github.com/dustinlacewell/steamworks-ts

TypeScript bindings to the Steamworks SDK
https://github.com/dustinlacewell/steamworks-ts

napi-rs rust steam steamworks typescript

Last synced: 4 days ago
JSON representation

TypeScript bindings to the Steamworks SDK

Awesome Lists containing this project

README

          

steamworks-ts



This package provides typed NodeJS bindings to the Steamworks SDK.




NPM Version


License





Build


Docs




Documentation

## Usage

```ts
import { SteamClient } from 'steamworks-ts';

const steam = new SteamClient();
const { steamId, accountId, name, loggedOn } = steam.getCurrentUser();
```

## Building locally

You must have a [Rust Toolchain](https://www.rust-lang.org/tools/install) and [NodeJS](https://nodejs.org/):

```bash
$ npm i
$ npm run dev
```

This should produce `steamworks-ts.-.node`.

## The `steam_appid.txt` File

Steamworks requires a file named `steam_appid.txt` containing the AppID of the Steam app Steamworks is meant to interact with. If this file doesn't exist, you'll get a warning and one will be created automatically:

```bash
$ npx tsx examples/user_info.ts
Warning, creating default steam_appid.txt with 480 (Spacewar)
...
```

> Spacewar is an example application used to help developers understand the usage of the Steamworks API.

## Examples

After [building locally](#building-locally), you can run examples with `tsx`:

```
bash
$ npx tsx examples/user_info.ts
```

## License
This package is licensed under [MIT](./LICENSE-MIT).

## Help, I can't run my game/tool!
If you are seeing errors like `STATUS_DLL_NOT_FOUND`, `Image not found` etc. your platform is not likely supported by steamworks-ts or you forgot to [build](#building-locally).







Built ontop of steamworks-rs


Built with the awesome napi-rs project.