kSteam is a multiplatform Kotlin library which allows you to connect to the Valve's Steam network.
Caution
This library is in very early state, so expect bugs and incomplete features. Also, releases are mostly not binary compatible between each other due to rapid development process.
Important
Please note that this library is UNOFFICIAL and not endorsed, sponsored, allowed, developed by Valve Corporation or related to it. Don't report bugs to them!
- Access to the Steam network by using the modern WebSocket approach
- Stable and async-first architecture with proper documentation
- Provide an easy-to-use library for accessing the Steam network on JVM/Android
- Manage high performance and low memory/storage footprint by using well-tested modern technology such as Wire (for protobufs) and Ktor (for networking)
- Provide full Steam Guard and new auth flow support
- Removing the gap between WebAPI and Steam3 messages
Refer to the examples document for more information how to use kSteam for various needs.
You can also check out Cobalt - an Android replacement for the official Steam client that uses kSteam.
Note: if you want to try experimental iOS K/Native support, set
ALLOW_APPLE_PLATFORMStotrueinbuild-extensions/src/main/kotlin/CoreMppSetup.ktbefore building.
Because kSteam is still in a very early stage, you will need to compile it before using. However, the process is streamlined:
- Clone the repository.
- Run
./gradlew publishToMavenLocal. - Every kSteam module will now be available on local Maven repository.
Tested on IntelliJ IDEA 2024.3.1.1 with JDK 17.
dependencies {
// Main kSteam core: a small client that connects to the Steam network. Also handles API and authorization requests.
implementation("bruhcollective.itaysonlab.ksteam:core:$VERSION")
// Persistence module that is used to save authorization data between sessions
implementation("bruhcollective.itaysonlab.ksteam:core-persistence:$VERSION")
// Steam Protobuf definitions compiled to Wire Kotlin. Not required to include if you include the core.
implementation("bruhcollective.itaysonlab.ksteam:proto-common:$VERSION")
// Experimental kotlinx.serialization VDF module
implementation("bruhcollective.itaysonlab:kotlinx-vdf-android:$VERSION")
}Supported:
- jvm
- android
Experimental:
- iosX64, iosArm64, iosSimulatorArm64
- macosX64, macosArm64
Unsupported:
- androidNativeX64, androidNativeX86
- linuxX64, linuxArm64
- watchosDeviceArm64, watchosSimulatorArm64, watchosX64, watchosArm32, watchosArm64
- tvosX64, tvosSimulatorArm64, tvosArm64
- mingwX64
If you are using Jetpack Compose, you would probably want to mark kSteam models as stable.
To do that, add the following lines to your Compose module's build script:
composeCompiler {
stabilityConfigurationFile = layout.projectDirectory.file("stability.conf")
}and add the following to the file stability.conf (any file name can be used)
bruhcollective.itaysonlab.ksteam.models.**
This will significantly reduce the number of recompositions if you are directly using kSteam models in composables.
- SteamKit and JavaSteam - base for understanding how Steam3 network works
- SteamDB protobuf repository is used in modules
- Ktor is used as a networking library
- Wire is used for protobuf decoding/encoding
- Okio is used for cross-platform filesystem access, VDF parsing and byte manipulation
- Immutable Collections Library for Kotlin
- kotlinx-datetime
- cache4k for synchronized in-memory cache