DIDComm bindings based on uniffi-rs.
It's used for DIDComm Swift wrapper.
DIDComm uniffi has the following specific comparing to the core DIDComm crate:
- Callback-based versions of pack/unpack functions and DID/Secret resolver interfaces instead of async onces. These pack/unpack functions wrap the corresponding async futures and execute them in a thread pool executor. The result is passed to a callback function.
- The language specific bidnings are generated for the API exposed in didcomm.udl file.
- Build:
cargo build --release
- Install uniffi_bindgen:
cargo install uniffi_bindgen --version $(cargo pkgid uniffi | cut -f 2 -d '@')
- Generate Swift binding:
uniffi-bindgen generate src/didcomm.udl --language swift -o ../wrappers/swift/didcomm
- Compile a Swift module:
swiftc -module-name didcomm -emit-library -o ../wrappers/swift/didcomm/libdidcomm.dylib -emit-module -emit-module-path ../wrappers/swift/didcomm -parse-as-library -L ./target/debug/ -ldidcomm_uniffi -Xcc -fmodule-map-file=../wrappers/swift/didcomm/didcommFFI.modulemap ../wrappers/swift/didcomm/didcomm.swift