Add Steam Leaderboards bindings#208
Open
DavidBCD wants to merge 1 commit into
Open
Conversation
Wraps the upstream steamworks-rs leaderboard API as a new `leaderboards` namespace. JS callers operate by leaderboard name; an internal cache keeps the resolved Steam handles so subsequent calls skip the find round-trip. Functions: - findOrCreateLeaderboard(name, sortMethod, displayType) -> bool - findLeaderboard(name) -> bool - uploadLeaderboardScore(name, sortMethod, displayType, method, score, details?) -> LeaderboardScoreUploaded - downloadLeaderboardEntries(name, request, rangeStart, rangeEnd, maxDetails?) -> LeaderboardEntry[] - getLeaderboardEntryCount(name) -> number Enums: LeaderboardSortMethod, LeaderboardDisplayType, LeaderboardDataRequest, UploadScoreMethod. Async via tokio::oneshot, matching the existing workshop module pattern. Verified end-to-end against App ID 480 (Spacewar): findOrCreate -> upload -> count -> download all return live results from the Steam client.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wraps the upstream steamworks-rs leaderboard API as a new
leaderboardsnamespace. JS callers operate by leaderboard name; an internal cache keeps the resolved Steam handles so subsequent calls skip the find round-trip.Adds the leaderboards subsystem — currently the only major Steamworks API not surfaced by this library. Useful for indie games doing time-attack / score-attack loops.
AttachLeaderboardUGC (for ghost replays / file attachments per score entry) isn't included — steamworks-rs doesn't expose it yet. Happy to follow up with PRs in both repos once that lands upstream.
Functions:
Enums: LeaderboardSortMethod, LeaderboardDisplayType, LeaderboardDataRequest, UploadScoreMethod.
Async via tokio::oneshot, matching the existing workshop module pattern.
Verified end-to-end against App ID 480 (Spacewar): findOrCreate ->
upload -> count -> download all return live results from the Steam client.