Skip to content

iTaysonLab/kSteam

Repository files navigation

kSteam

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!


Features

  • Access to the Steam network by using the modern WebSocket approach
  • Stable and async-first architecture with proper documentation

Goals

  • 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

Usage

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.

Building

Note: if you want to try experimental iOS K/Native support, set ALLOW_APPLE_PLATFORMS to true in build-extensions/src/main/kotlin/CoreMppSetup.kt before building.

Because kSteam is still in a very early stage, you will need to compile it before using. However, the process is streamlined:

  1. Clone the repository.
  2. Run ./gradlew publishToMavenLocal.
  3. Every kSteam module will now be available on local Maven repository.

Tested on IntelliJ IDEA 2024.3.1.1 with JDK 17.

Modules

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")
}

Platform Support

Supported:

  • jvm
  • android

Experimental:

  • iosX64, iosArm64, iosSimulatorArm64
  • macosX64, macosArm64

Unsupported:

  • androidNativeX64, androidNativeX86
  • linuxX64, linuxArm64
  • watchosDeviceArm64, watchosSimulatorArm64, watchosX64, watchosArm32, watchosArm64
  • tvosX64, tvosSimulatorArm64, tvosArm64
  • mingwX64

Jetpack Compose

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.

Credits

About

k(otlin)Steam - a Steam3 network client with UI building in mind

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages