Skip to content

Commit

Permalink
Iroh Integration Prototype (#1)
Browse files Browse the repository at this point in the history
*  Initial Iroh Integration with Svelte and Tauri for File Sharing

---------

Co-authored-by: Kirill Taran <kirill@taran.space>
  • Loading branch information
alvinosh and kirillt authored Sep 9, 2024
1 parent b000c80 commit c2f21db
Show file tree
Hide file tree
Showing 50 changed files with 21,342 additions and 1,186 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build-library.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build Library

env:
CARGO_TERM_COLOR: always

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-library:
name: Build Core Library and Kotlin Bindings
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Rust cache
uses: swatinem/rust-cache@v2
- name: install cargo ndk
run: cargo install cargo-ndk
- name: Add Rust Toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
- name: Build Library
run: cargo ndk -o ./target/release/jniLibs --target aarch64-linux-android --target armv7-linux-androideabi --target i686-linux-android --target x86_64-linux-android build -p drop_core --release
- name: Build Rust Library
run: cargo build -p drop_core
- name: Generate Bindings
run: cargo run -p uniffi-bingen generate --library ./target/debug/drop_core.dll --language=kotlin --out-dir ./target/release/bindings
- name: Upload Library
uses: actions/upload-artifact@v4
with:
name: ark-drop-core
path: ./target/release/jniLibs
- name: Upload Bindings
uses: actions/upload-artifact@v4
with:
name: ark-drop-bindings
path: ./target/release/bindings
27 changes: 16 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,33 @@ name: Build
env:
CARGO_TERM_COLOR: always

on: [push]
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-tauri:
name: Build Tauri Application
permissions:
contents: write
strategy:
fail-fast: false
matrix:
settings:
- platform: 'macos-latest' # for Arm based macs (M1 and above).
- platform: 'macos-latest'
args: '--target universal-apple-darwin'
- platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04.
- platform: 'ubuntu-22.04'
args: ''
- platform: 'windows-latest'
args: ''

runs-on: ${{ matrix.settings.platform }}
env:
CI: true
steps:
- uses: actions/checkout@v4

Expand All @@ -29,8 +38,6 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
# You can remove the one that doesn't apply to your app to speed up the workflow a bit.
- name: setup node
uses: actions/setup-node@v4
Expand All @@ -46,8 +53,6 @@ jobs:

- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'

- name: install frontend dependencies
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
Expand All @@ -67,25 +72,25 @@ jobs:
if: matrix.settings.platform == 'windows-latest'
with:
name: ark-drop-Windows.zip
path: ./src-tauri/target/release/bundle/
path: ./target/release/bundle/

- name: Upload Linux AppImage
if: matrix.settings.platform == 'ubuntu-22.04'
uses: actions/upload-artifact@v4
with:
name: ark-drop.AppImage
path: ./src-tauri/target/release/bundle/appimage/ark-drop_*_amd64.AppImage
path: ./target/release/bundle/appimage/ark-drop_*_amd64.AppImage

- name: Upload MacOS Build (ark-drop.app)
uses: actions/upload-artifact@v4
if: matrix.settings.platform == 'macos-latest'
with:
name: ark-drop-MacOS.zip
path: ./src-tauri/target/universal-apple-darwin/release/bundle/macos
path: ./target/universal-apple-darwin/release/bundle/macos

- name: Upload MacOS Build (ark-drop.dmg)
uses: actions/upload-artifact@v4
if: matrix.settings.platform == 'macos-latest'
with:
name: ark-drop-MacOS-dmg.zip
path: ./src-tauri/target/universal-apple-darwin/release/bundle/dmg
path: ./target/universal-apple-darwin/release/bundle/dmg
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ target
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
/src-tauri/.ark-drop-data-*
target
.vscode
11 changes: 0 additions & 11 deletions .vscode/settings.json

This file was deleted.

Loading

0 comments on commit c2f21db

Please sign in to comment.