Vapour

Type-safe Gleam bindings for the Steamworks SDK via steamworks-ffi-node.

License: MIT

Features

Installation

Add to your package.json:

{
  "dependencies": {
    "steamworks-ffi-node": "^0.5.3"
  }
}

Add vapour to your gleam project:

gleam add vapour@1

Key Concepts

Callbacks

Call vapour.run_callbacks(client) regularly (every frame or every 100ms) to process Steam events.

Achievements are Async

Achievement functions return Promises. Use gleam/javascript/promise to handle them:

use success <- promise.await(vapour.unlock_achievement(client, "MY_ACHIEVEMENT"))
io.println("Result: " <> bool.to_string(success))
promise.resolve(Nil)

Cloud Storage

Steam Cloud must be enabled for your app and the user’s account. Check with:

let enabled = vapour.cloud_enabled_for_account(client)

Documentation

All functions are fully documented with examples. Use your editor’s autocomplete or see the source code for detailed documentation.

Example Project

See the examples directory for a complete demo that tests all functionality:

cd examples
gleam build
gleam run

Note: You need Steam running and the Spacewar app (AppID 480) for testing.

Requirements

License

MIT License - see LICENSE for details.

Important: While Vapour is MIT licensed, using the Steamworks SDK requires compliance with the Steamworks SDK License Agreement. You must be a registered Steam developer to use Steamworks in production.

Credits


Made with ✨ by Renata Amutio

Search Document