Skip to content

For traverse refactor#1

Merged
maxded merged 37 commits intofor-traversefrom
steamworks-refactors
Mar 3, 2025
Merged

For traverse refactor#1
maxded merged 37 commits intofor-traversefrom
steamworks-refactors

Conversation

@maxded
Copy link
Collaborator

@maxded maxded commented Feb 27, 2025

This PR includes the following changes:

  • Update steamworks SDK to 1.61
  • Update Rust dependencies
  • Minor updates to CI
  • Moved to runtime library loading through libloading
    • Only ported over APIs that we require for our internal projects
  • Simplified steamworks-sys's build.rs
    • Copy steam sdk library to target_dir instead of out_dir

When reviewing, focus on the following files:

  • steamworks/lib.rs
  • steamworks-sys/build.rs

@maxded maxded requested a review from MarijnS95 March 3, 2025 09:56
@maxded maxded marked this pull request as ready for review March 3, 2025 09:56
@@ -44,7 +34,7 @@ jobs:

- uses: actions-rs/cargo@v1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for this PR, but if we're going to maintain this ourselves going forward actions-rs should just be removed. It's deprecated and unmaintained for years.

src/callback.rs Outdated
}
// pub(crate) unsafe fn register_call_result<C, F, Manager>(
// inner: &Arc<Inner<Manager>>,
// api_call: sys::SteamAPICall_t,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this maybe still there? Might not want to comment it out if we use the file and contents compile successfully.

let lib_name = libloading::library_filename("steam_api");

let exe_path = std::env::current_exe().unwrap();
exe_path.parent().unwrap().join(lib_name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't this the default on Windows? Or did it look relative to PATH/cwd? Or all of them?

https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibraryw#remarks 🙈

Copy link
Collaborator Author

@maxded maxded Mar 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it looked next to exe on Windows but when I passed only the library_filename to libloading::Library::new(path) it didn't work. Specifying the full path to the exe did work so 🤷.

.join("public/steam/steam_gameserver.h")
.to_string_lossy(),
)
.allowlist_item("SteamAPI\\w+")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That'd be nice to upstream to get rid of spam there too :)

maxded and others added 5 commits March 3, 2025 15:35
Co-authored-by: Marijn Suijten <marijns95@gmail.com>
Co-authored-by: Marijn Suijten <marijns95@gmail.com>
@maxded maxded merged commit 9dab8c0 into for-traverse Mar 3, 2025
6 checks passed
@maxded maxded deleted the steamworks-refactors branch March 3, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants