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

UNIFFI Bindings For Core Library #5

Merged
merged 3 commits into from
Jul 4, 2024
Merged
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
22 changes: 12 additions & 10 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSaveMode": "file",
"editor.tabSize": 4,
"editor.insertSpaces": false,

}
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSaveMode": "file",
"editor.tabSize": 4,
"editor.insertSpaces": false,
"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml"
}
}
117 changes: 117 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[workspace]
resolver = "2"
members = [
"core",
"src-tauri"
]
members = ["core", "src-tauri", "uniffi-bingen"]

[workspace.dependencies]
iroh = "0.17.0"
Expand All @@ -20,4 +17,3 @@ rand = "0.8.5"
tokio = { version = "1.37.0", features = ["full"] }
tokio-util = "0.7.11"
bytes = "1.6.0"

31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,30 @@
# ARK Drop
## Dependencies

Cross compilation building is done easiest via cross library.

- [Cross](https://github.com/cross-rs/cross)

Alternatively you can setup the NDK and build manually

## Build

Make sure you have added the nessecary targets to build for android

```sh
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android
```

Build the cdylib for all the targets

```sh
cross build -p drop_core --target aarch64-linux-android
cross build -p drop_core --target armv7-linux-androideab
cross build -p drop_core --target i686-linux-android
cross build -p drop_core --target x86_64-linux-android
```

Generate the bindings using uniffi for kotlin

```sh
cargo run -p uniffi-bingen generate --library target/x86_64-linux-android/debug/libdrop_core.so --language=kotlin --out-dir ./bindings
```
Loading
Loading