Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build go lib with newest bindgen. #52

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ build-darwin-arm64:

code-gen-go:
mkdir -p lightspark-crypto-go/internal
cargo install uniffi-bindgen-go --git https://github.com/NordSecurity/uniffi-bindgen-go --tag v0.1.5+v0.23.0
cargo install uniffi-bindgen-go --git https://github.com/NordSecurity/uniffi-bindgen-go
uniffi-bindgen-go src/lightspark_crypto.udl --out-dir lightspark-crypto-go
mv lightspark-crypto-go/uniffi/lightspark_crypto/* lightspark-crypto-go/internal
mv lightspark-crypto-go/lightspark_crypto/* lightspark-crypto-go/internal
sed -i '' 's/package lightspark_crypto/package internal/g' lightspark-crypto-go/internal/lightspark_crypto.go
rm -rf lightspark-crypto-go/uniffi

Expand Down
8 changes: 8 additions & 0 deletions lightspark-crypto-go/internal/lightspark_crypto.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include <lightspark_crypto.h>

// This file exists beacause of
// https://github.com/golang/go/issues/11263

void cgo_rust_task_callback_bridge_lightspark_crypto(RustTaskCallback cb, const void * taskData, int8_t status) {
cb(taskData, status);
}
Loading
Loading