diff --git a/Cargo.toml b/Cargo.toml
index f7b9cef4..513443f8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -2,6 +2,7 @@
members = [
"crates/web5",
"crates/web5_cli",
+ "crates/web5_proc_macros",
"bindings/web5_uniffi",
"bindings/web5_uniffi_wrapper",
]
diff --git a/bindings/web5_uniffi/libtargets/x86_64_unknown_linux_gnu/Dockerfile b/bindings/web5_uniffi/libtargets/x86_64_unknown_linux_gnu/Dockerfile
index aa8a30a6..202b6873 100644
--- a/bindings/web5_uniffi/libtargets/x86_64_unknown_linux_gnu/Dockerfile
+++ b/bindings/web5_uniffi/libtargets/x86_64_unknown_linux_gnu/Dockerfile
@@ -19,6 +19,7 @@ COPY bindings/web5_uniffi_wrapper ./bindings/web5_uniffi_wrapper
COPY bindings/web5_uniffi ./bindings/web5_uniffi
COPY crates/web5 ./crates/web5
COPY crates/web5_cli ./crates/web5_cli
+COPY crates/web5_proc_macros ./crates/web5_proc_macros
# Execute the build
RUN cargo build --release --package web5_uniffi
diff --git a/bindings/web5_uniffi/libtargets/x86_64_unknown_linux_musl/Dockerfile b/bindings/web5_uniffi/libtargets/x86_64_unknown_linux_musl/Dockerfile
index 8a2df5a0..6c2bc3d2 100644
--- a/bindings/web5_uniffi/libtargets/x86_64_unknown_linux_musl/Dockerfile
+++ b/bindings/web5_uniffi/libtargets/x86_64_unknown_linux_musl/Dockerfile
@@ -24,6 +24,7 @@ COPY bindings/web5_uniffi_wrapper ./bindings/web5_uniffi_wrapper
COPY bindings/web5_uniffi ./bindings/web5_uniffi
COPY crates/web5 ./crates/web5
COPY crates/web5_cli ./crates/web5_cli
+COPY crates/web5_proc_macros ./crates/web5_proc_macros
# Build the static lib (override the lib type)
RUN sed -i 's/crate-type = \["cdylib"\]/crate-type = \["staticlib"\]/' bindings/web5_uniffi/Cargo.toml
diff --git a/bound/kt/pom.xml b/bound/kt/pom.xml
index 1c16b415..c271b81a 100644
--- a/bound/kt/pom.xml
+++ b/bound/kt/pom.xml
@@ -539,29 +539,6 @@
${kotlin.jvm.target}
-
- org.codehaus.mojo
- exec-maven-plugin
- 3.0.0
-
-
- get-git-commit-id
-
- exec
-
- initialize
-
- git
-
- rev-parse
- --short
- HEAD
-
- ${project.build.directory}/git-commit-id.txt
-
-
-
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/bound/kt/src/main/kotlin/web5/sdk/rust/SystemTarget.kt b/bound/kt/src/main/kotlin/web5/sdk/rust/SystemTarget.kt
index a26bcd74..a31fb046 100644
--- a/bound/kt/src/main/kotlin/web5/sdk/rust/SystemTarget.kt
+++ b/bound/kt/src/main/kotlin/web5/sdk/rust/SystemTarget.kt
@@ -3,19 +3,10 @@ package web5.sdk.rust
import java.io.File
internal val logLevel = System.getenv("WEB5_SDK_LOG_LEVEL")?.lowercase()
-internal val gitCommitHash = run {
- val commitFile = File("target/git-commit-id.txt")
- if (commitFile.exists()) {
- commitFile.readText().trim()
- } else {
- println("Git commit hash not found.")
- ""
- }
-}
internal fun log(message: String) {
if (logLevel == "debug") {
- println("web5 sdk SystemArchitecture $gitCommitHash: $message")
+ println("web5 sdk SystemArchitecture $message")
}
}
diff --git a/crates/web5/Cargo.toml b/crates/web5/Cargo.toml
index 505837ae..ec80bddb 100644
--- a/crates/web5/Cargo.toml
+++ b/crates/web5/Cargo.toml
@@ -15,7 +15,6 @@ josekit = "0.8.6"
jsonpath-rust = "0.5.1"
jsonschema = { version = "0.18.0", default-features = false }
k256 = { version = "0.13.3", features = ["ecdsa", "jwk"] }
-lazy_static = "1.5.0"
tokio = "1.38.0"
rand = { workspace = true }
regex = "1.10.4"
@@ -27,6 +26,7 @@ simple-dns = "0.7.0"
thiserror = { workspace = true }
url = "2.5.0"
uuid = { workspace = true }
+web5_proc_macros = { path = "../web5_proc_macros" }
zbase32 = "0.1.2"
[dev-dependencies]
diff --git a/crates/web5/build.rs b/crates/web5/build.rs
deleted file mode 100644
index 9d322b71..00000000
--- a/crates/web5/build.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-use std::process::Command;
-
-fn main() {
- // Execute the `git rev-parse HEAD` command to get the current commit hash
- let output = Command::new("git")
- .args(["rev-parse", "HEAD"])
- .output()
- .expect("Failed to execute git command");
-
- // Convert the output to a string
- let git_hash = String::from_utf8(output.stdout).expect("Invalid UTF-8 sequence");
-
- // Remove the newline character from the commit hash
- let git_hash_trimmed = git_hash.trim();
-
- // Pass the commit hash to the compiler as an environment variable
- println!("cargo:rustc-env=WEB5_GIT_COMMIT_HASH={}", git_hash_trimmed);
-}
diff --git a/crates/web5/src/lib.rs b/crates/web5/src/lib.rs
index 0d5d96f8..6088c1bd 100644
--- a/crates/web5/src/lib.rs
+++ b/crates/web5/src/lib.rs
@@ -8,35 +8,30 @@ pub mod errors;
pub mod json;
pub mod rfc3339;
-#[cfg(test)]
-mod test_vectors;
#[cfg(test)]
mod test_helpers;
-
-pub const GIT_COMMIT_HASH: &str = env!("WEB5_GIT_COMMIT_HASH");
+#[cfg(test)]
+mod test_vectors;
// TODO: https://github.com/TBD54566975/web5-rs/issues/287
#[allow(dead_code)]
-static LOG_LEVEL: LazyLock