mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-06 13:53:54 +02:00
feat: update swift-rs (#285)
* feat: update swift-rs * swift-rs v1 * pin deps
This commit is contained in:
committed by
GitHub
parent
961602bd1b
commit
539c38a692
@@ -26,7 +26,7 @@ fern = "0.6"
|
||||
android_logger = "0.11"
|
||||
|
||||
[target."cfg(target_os = \"ios\")".dependencies]
|
||||
swift-rs = { git = "https://github.com/Brendonovich/swift-rs", rev = "eb6de914ad57501da5019154d476d45660559999" }
|
||||
swift-rs = "1.0.1"
|
||||
|
||||
[features]
|
||||
colored = ["fern/colored"]
|
||||
@@ -3,11 +3,11 @@ import Tauri
|
||||
import SwiftRs
|
||||
|
||||
@_cdecl("tauri_log")
|
||||
func log(level: Int, message: UnsafePointer<SRString>) {
|
||||
func log(level: Int, message: SRString) {
|
||||
switch level {
|
||||
case 1: Logger.debug(message.pointee.to_string())
|
||||
case 2: Logger.info(message.pointee.to_string())
|
||||
case 3: Logger.error(message.pointee.to_string())
|
||||
case 1: Logger.debug(message.toString())
|
||||
case 2: Logger.info(message.toString())
|
||||
case 3: Logger.error(message.toString())
|
||||
default: break
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,9 +23,9 @@ use tauri::{
|
||||
pub use fern;
|
||||
|
||||
#[cfg(target_os = "ios")]
|
||||
extern "C" {
|
||||
fn tauri_log(level: u8, message: &swift_rs::SRString);
|
||||
}
|
||||
swift_rs::swift!(fn tauri_log(
|
||||
level: u8, message: &swift_rs::SRString
|
||||
));
|
||||
|
||||
const DEFAULT_MAX_FILE_SIZE: u128 = 40000;
|
||||
const DEFAULT_ROTATION_STRATEGY: RotationStrategy = RotationStrategy::KeepOne;
|
||||
|
||||
Reference in New Issue
Block a user