feat: update swift-rs (#285)

* feat: update swift-rs

* swift-rs v1

* pin deps
pull/302/head
Lucas Fernandes Nogueira 2 years ago committed by GitHub
parent 961602bd1b
commit 539c38a692
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

21
Cargo.lock generated

@ -4140,10 +4140,11 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
[[package]] [[package]]
name = "swift-rs" name = "swift-rs"
version = "0.3.0" version = "1.0.1"
source = "git+https://github.com/Brendonovich/swift-rs?rev=eb6de914ad57501da5019154d476d45660559999#eb6de914ad57501da5019154d476d45660559999" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "806ff0904302a8a91644422fcfeee4828c3a9dbcfd1757ba495f1a755c2ac873"
dependencies = [ dependencies = [
"base64 0.13.1", "base64 0.21.0",
"serde", "serde",
"serde_json", "serde_json",
] ]
@ -4258,7 +4259,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri" name = "tauri"
version = "2.0.0-alpha.3" version = "2.0.0-alpha.3"
source = "git+https://github.com/tauri-apps/tauri?branch=next#105fe3fa242df87ad7655b519b0c01c3da9d8ee4" source = "git+https://github.com/tauri-apps/tauri?branch=next#5d94eaa3bc9f1e5cf3e0fa64fba5801d494c2541"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"attohttpc", "attohttpc",
@ -4308,7 +4309,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-build" name = "tauri-build"
version = "2.0.0-alpha.1" version = "2.0.0-alpha.1"
source = "git+https://github.com/tauri-apps/tauri?branch=next#105fe3fa242df87ad7655b519b0c01c3da9d8ee4" source = "git+https://github.com/tauri-apps/tauri?branch=next#5d94eaa3bc9f1e5cf3e0fa64fba5801d494c2541"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"cargo_toml", "cargo_toml",
@ -4327,7 +4328,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-codegen" name = "tauri-codegen"
version = "2.0.0-alpha.1" version = "2.0.0-alpha.1"
source = "git+https://github.com/tauri-apps/tauri?branch=next#105fe3fa242df87ad7655b519b0c01c3da9d8ee4" source = "git+https://github.com/tauri-apps/tauri?branch=next#5d94eaa3bc9f1e5cf3e0fa64fba5801d494c2541"
dependencies = [ dependencies = [
"base64 0.21.0", "base64 0.21.0",
"brotli", "brotli",
@ -4352,7 +4353,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-macros" name = "tauri-macros"
version = "2.0.0-alpha.1" version = "2.0.0-alpha.1"
source = "git+https://github.com/tauri-apps/tauri?branch=next#105fe3fa242df87ad7655b519b0c01c3da9d8ee4" source = "git+https://github.com/tauri-apps/tauri?branch=next#5d94eaa3bc9f1e5cf3e0fa64fba5801d494c2541"
dependencies = [ dependencies = [
"heck", "heck",
"proc-macro2", "proc-macro2",
@ -4573,7 +4574,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-runtime" name = "tauri-runtime"
version = "0.13.0-alpha.1" version = "0.13.0-alpha.1"
source = "git+https://github.com/tauri-apps/tauri?branch=next#105fe3fa242df87ad7655b519b0c01c3da9d8ee4" source = "git+https://github.com/tauri-apps/tauri?branch=next#5d94eaa3bc9f1e5cf3e0fa64fba5801d494c2541"
dependencies = [ dependencies = [
"gtk", "gtk",
"http", "http",
@ -4594,7 +4595,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-runtime-wry" name = "tauri-runtime-wry"
version = "0.13.0-alpha.1" version = "0.13.0-alpha.1"
source = "git+https://github.com/tauri-apps/tauri?branch=next#105fe3fa242df87ad7655b519b0c01c3da9d8ee4" source = "git+https://github.com/tauri-apps/tauri?branch=next#5d94eaa3bc9f1e5cf3e0fa64fba5801d494c2541"
dependencies = [ dependencies = [
"cocoa", "cocoa",
"gtk", "gtk",
@ -4614,7 +4615,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-utils" name = "tauri-utils"
version = "2.0.0-alpha.1" version = "2.0.0-alpha.1"
source = "git+https://github.com/tauri-apps/tauri?branch=next#105fe3fa242df87ad7655b519b0c01c3da9d8ee4" source = "git+https://github.com/tauri-apps/tauri?branch=next#5d94eaa3bc9f1e5cf3e0fa64fba5801d494c2541"
dependencies = [ dependencies = [
"brotli", "brotli",
"ctor", "ctor",

@ -26,7 +26,7 @@ fern = "0.6"
android_logger = "0.11" android_logger = "0.11"
[target."cfg(target_os = \"ios\")".dependencies] [target."cfg(target_os = \"ios\")".dependencies]
swift-rs = { git = "https://github.com/Brendonovich/swift-rs", rev = "eb6de914ad57501da5019154d476d45660559999" } swift-rs = "1.0.1"
[features] [features]
colored = ["fern/colored"] colored = ["fern/colored"]

@ -3,11 +3,11 @@ import Tauri
import SwiftRs import SwiftRs
@_cdecl("tauri_log") @_cdecl("tauri_log")
func log(level: Int, message: UnsafePointer<SRString>) { func log(level: Int, message: SRString) {
switch level { switch level {
case 1: Logger.debug(message.pointee.to_string()) case 1: Logger.debug(message.toString())
case 2: Logger.info(message.pointee.to_string()) case 2: Logger.info(message.toString())
case 3: Logger.error(message.pointee.to_string()) case 3: Logger.error(message.toString())
default: break default: break
} }
} }

@ -23,9 +23,9 @@ use tauri::{
pub use fern; pub use fern;
#[cfg(target_os = "ios")] #[cfg(target_os = "ios")]
extern "C" { swift_rs::swift!(fn tauri_log(
fn tauri_log(level: u8, message: &swift_rs::SRString); level: u8, message: &swift_rs::SRString
} ));
const DEFAULT_MAX_FILE_SIZE: u128 = 40000; const DEFAULT_MAX_FILE_SIZE: u128 = 40000;
const DEFAULT_ROTATION_STRATEGY: RotationStrategy = RotationStrategy::KeepOne; const DEFAULT_ROTATION_STRATEGY: RotationStrategy = RotationStrategy::KeepOne;

Loading…
Cancel
Save