From 6e467502f2df7b36cb6797f5e8206e56ada8add8 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 3 Nov 2024 11:42:37 +0100 Subject: [PATCH] add go and ruby add ruby --- crates/servicepoint_binding_uniffi/Cargo.toml | 21 ++++++++++++++----- .../generate-bindings.sh | 3 +++ .../src/bin/uniffi-bindgen-go.rs | 3 +++ 3 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 crates/servicepoint_binding_uniffi/src/bin/uniffi-bindgen-go.rs diff --git a/crates/servicepoint_binding_uniffi/Cargo.toml b/crates/servicepoint_binding_uniffi/Cargo.toml index 5ba77a5..58248c3 100644 --- a/crates/servicepoint_binding_uniffi/Cargo.toml +++ b/crates/servicepoint_binding_uniffi/Cargo.toml @@ -13,7 +13,7 @@ repository = "https://github.com/cccb/servicepoint" crate-type = ["cdylib"] [build-dependencies] -uniffi = { version = "0.25.0" , features = [ "build" ] } +uniffi = { version = "0.25.0", features = ["build"] } [dependencies] uniffi = { version = "0.25.0" } @@ -25,10 +25,16 @@ path = "../servicepoint" features = ["all_compressions"] [dependencies.uniffi-bindgen-cs] -git="https://github.com/NordSecurity/uniffi-bindgen-cs" +git = "https://github.com/NordSecurity/uniffi-bindgen-cs" # tag="v0.8.3+v0.25.0" -rev="f68639fbc720b50ebe561ba75c66c84dc456bdce" -optional=true +rev = "f68639fbc720b50ebe561ba75c66c84dc456bdce" +optional = true + +[dependencies.uniffi-bindgen-go] +git = "https://github.com/NordSecurity/uniffi-bindgen-go.git" +# tag = "0.2.1+v0.25.0" +rev = "a77dc0462dc18d53846c758155ab4e0a42e5b240" +optional = true [lints] #workspace = true @@ -42,8 +48,13 @@ required-features = ["uniffi/cli"] [[bin]] name = "uniffi-bindgen-cs" -required-features= ["cs"] +required-features = ["cs"] + +[[bin]] +name = "uniffi-bindgen-go" +required-features = ["go"] [features] default = [] cs = ["dep:uniffi-bindgen-cs"] +go = ["dep:uniffi-bindgen-go"] \ No newline at end of file diff --git a/crates/servicepoint_binding_uniffi/generate-bindings.sh b/crates/servicepoint_binding_uniffi/generate-bindings.sh index 539b61e..a25a809 100755 --- a/crates/servicepoint_binding_uniffi/generate-bindings.sh +++ b/crates/servicepoint_binding_uniffi/generate-bindings.sh @@ -12,9 +12,12 @@ CONFIG_TOML="$(realpath $SCRIPTPATH/../uniffi.toml)" BINDGEN="cargo run --features=uniffi/cli --bin uniffi-bindgen -- " BINDGEN_CS="cargo run --features=cs --bin uniffi-bindgen-cs -- " +BINDGEN_GO="cargo run --features=go --bin uniffi-bindgen-go -- " COMMON_ARGS="--library $SERVICEPOINT_SO" ${BINDGEN} generate $COMMON_ARGS --language python --out-dir libraries/python ${BINDGEN} generate $COMMON_ARGS --language kotlin --out-dir libraries/kotlin ${BINDGEN} generate $COMMON_ARGS --language swift --out-dir libraries/swift +${BINDGEN} generate $COMMON_ARGS --language ruby --out-dir libraries/ruby ${BINDGEN_CS} $COMMON_ARGS --out-dir libraries/csharp/ServicePoint +${BINDGEN_GO} $COMMON_ARGS --out-dir libraries/go/ diff --git a/crates/servicepoint_binding_uniffi/src/bin/uniffi-bindgen-go.rs b/crates/servicepoint_binding_uniffi/src/bin/uniffi-bindgen-go.rs new file mode 100644 index 0000000..5f01856 --- /dev/null +++ b/crates/servicepoint_binding_uniffi/src/bin/uniffi-bindgen-go.rs @@ -0,0 +1,3 @@ +fn main() { + uniffi_bindgen_go::main().unwrap(); +}