Vapour
Type-safe Gleam bindings for the Steamworks SDK via steamworks-ffi-node.
Install / Use
/learn @renatillas/VapourREADME
Vapour
Type-safe Gleam bindings for the Steamworks SDK via steamworks-ffi-node.
Features
- Core API - Initialize Steamworks, manage callbacks, check connection status
- Achievements - Unlock/lock achievements, list all achievements (async with Promises)
- Cloud Storage - Save/load files to Steam Cloud, manage cloud settings
- Rich Presence - Set player status visible to friends
- Overlay - Open Steam overlay dialogs (friends, achievements, store, web pages)
- Stats - Track player statistics, get/set int and float stats, global stats, user stats, average rate stats (async with Promises)
- Friends - Get friends list, check online status, view friend info, relationship status, coplay features
- Leaderboards - Find leaderboards, upload scores, download entries (async with Promises)
Installation
Add to your package.json:
{
"dependencies": {
"steamworks-ffi-node": "^0.6.0"
}
}
Important: How to setup Steamworks SDK
For the correct functionality of the library you will need to setup steamworks_sdk manually.
The author of steamworks-ffi-node has provided a guide here
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
- Gleam >= 1.0.0
- Node.js >= 18.0.0
- Steam running on your machine
- steamworks-ffi-node ^0.5.3
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
- Built with Gleam
- Bindings for steamworks-ffi-node by Artur Khutak
Made with ✨ by Renata Amutio
Related Skills
node-connect
348.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
348.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
348.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
