Compare commits
No commits in common. "1084402c28da23d07aef3a6598a5168c0d876a4e" and "d92b6f2bac8c1e008fb68b6857040f398632f683" have entirely different histories.
1084402c28
...
d92b6f2bac
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,6 +1,3 @@
|
|||
[submodule "proto/proto"]
|
||||
path = proto/proto
|
||||
url = https://github.com/SteamDatabase/Protobufs
|
||||
[submodule "abigen/proton"]
|
||||
path = abigen/proton
|
||||
url = https://github.com/ValveSoftware/Proton
|
||||
|
|
37
Cargo.lock
generated
37
Cargo.lock
generated
|
@ -197,26 +197,6 @@ version = "1.0.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "clang"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "84c044c781163c001b913cd018fc95a628c50d0d2dfea8bca77dad71edb16e37"
|
||||
dependencies = [
|
||||
"clang-sys",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clang-sys"
|
||||
version = "1.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
|
||||
dependencies = [
|
||||
"glob",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "color-eyre"
|
||||
version = "0.6.3"
|
||||
|
@ -572,12 +552,6 @@ version = "0.28.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
|
||||
|
||||
[[package]]
|
||||
name = "glob"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.14.5"
|
||||
|
@ -1981,17 +1955,6 @@ dependencies = [
|
|||
"vapore-struct",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "vapore-abigen"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"clang",
|
||||
"color-eyre",
|
||||
"env_logger",
|
||||
"log",
|
||||
"regex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "vapore-client"
|
||||
version = "0.0.0"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
[workspace]
|
||||
resolver = "2"
|
||||
members = [
|
||||
"abigen",
|
||||
"client",
|
||||
"lib",
|
||||
"proto",
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
[package]
|
||||
name = "vapore-abigen"
|
||||
edition = "2021"
|
||||
version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
clang = { version = "2.0.0", features = ["clang_10_0"] }
|
||||
color-eyre.workspace = true
|
||||
env_logger.workspace = true
|
||||
log.workspace = true
|
||||
regex = "1.10.6"
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 962bbc4e74dde0643a6edab7c845bc628601f23f
|
|
@ -1,62 +0,0 @@
|
|||
use std::{
|
||||
collections::BTreeMap,
|
||||
env,
|
||||
fs::{self, File},
|
||||
io::Read,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
use color_eyre::eyre;
|
||||
use regex::Regex;
|
||||
|
||||
fn main() -> eyre::Result<()> {
|
||||
env_logger::init();
|
||||
color_eyre::install()?;
|
||||
|
||||
let lsteamclient_path =
|
||||
PathBuf::from(env::var_os("PROTON_SOURCE").unwrap_or_else(|| "proton".into()))
|
||||
.join("lsteamclient");
|
||||
|
||||
let mut versions = BTreeMap::new();
|
||||
|
||||
for maybe_sdk in fs::read_dir(lsteamclient_path)? {
|
||||
let sdk = maybe_sdk?;
|
||||
if !sdk.file_type()?.is_dir() {
|
||||
continue;
|
||||
}
|
||||
let this_versions = interface_versions(&sdk.path())?;
|
||||
versions.insert(sdk.file_name(), this_versions);
|
||||
}
|
||||
|
||||
println!("{:#?}", versions);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn interface_versions(path: &Path) -> eyre::Result<BTreeMap<String, String>> {
|
||||
let re = Regex::new(r#"#define\s*(STEAM[A-Z]*)_INTERFACE_VERSION\s*"([a-zA-Z0-9_]*)""#)?;
|
||||
|
||||
let mut versions = BTreeMap::new();
|
||||
|
||||
for maybe_file in fs::read_dir(path)? {
|
||||
let file = maybe_file?;
|
||||
if !file.file_name().to_string_lossy().ends_with(".h") {
|
||||
continue;
|
||||
}
|
||||
|
||||
let mut content_bytes = Vec::new();
|
||||
if let Err(e) = File::open(file.path())?.read_to_end(&mut content_bytes) {
|
||||
log::warn!("Got error in {:?}: {}", file.path(), e)
|
||||
}
|
||||
|
||||
let content: String = content_bytes.into_iter().map(|c| c as char).collect();
|
||||
|
||||
for capture in re.captures_iter(&content) {
|
||||
versions.insert(
|
||||
capture.get(1).unwrap().as_str().to_string(),
|
||||
capture.get(2).unwrap().as_str().to_string(),
|
||||
);
|
||||
}
|
||||
}
|
||||
Ok(versions)
|
||||
}
|
|
@ -18,7 +18,7 @@
|
|||
{
|
||||
devShells.default =
|
||||
with pkgs;
|
||||
(mkShell.override { stdenv = llvmPackages.stdenv; }) {
|
||||
mkShell {
|
||||
packages = [
|
||||
rustPackages.cargo
|
||||
rustPackages.rustc
|
||||
|
@ -27,8 +27,6 @@
|
|||
|
||||
protobuf
|
||||
];
|
||||
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
|
||||
|
||||
RUST_SRC_PATH = "${rustPackages.rustPlatform.rustLibSrc}";
|
||||
RUST_LOG = "debug,vapore=trace,vapore-client=trace";
|
||||
RUST_BACKTRACE = "1";
|
||||
|
|
Loading…
Reference in a new issue