From d99db7a1e233a9903483dec18eb00ce07565bb4e Mon Sep 17 00:00:00 2001 From: Christien Rioux Date: Sun, 20 Oct 2024 01:58:47 +0000 Subject: [PATCH] fix-flutter-example --- .../src/network_manager/wasm/protocol/ws.rs | 2 ++ veilid-flutter/example/pubspec.lock | 12 +++++------ veilid-flutter/linux/CMakeLists.txt | 21 +++++++++++++++++++ veilid-flutter/linux/rust.cmake | 4 ++-- 4 files changed, 31 insertions(+), 8 deletions(-) diff --git a/veilid-core/src/network_manager/wasm/protocol/ws.rs b/veilid-core/src/network_manager/wasm/protocol/ws.rs index fb68b548..88a5ee8e 100644 --- a/veilid-core/src/network_manager/wasm/protocol/ws.rs +++ b/veilid-core/src/network_manager/wasm/protocol/ws.rs @@ -64,7 +64,9 @@ impl WebsocketNetworkConnection { instrument(level = "trace", err, skip(self)) )] pub async fn close(&self) -> io::Result> { + #[allow(unused_variables)] let x = self.inner.ws_meta.close().await.map_err(to_io); + #[cfg(feature = "verbose-tracing")] log_net!(debug "close result: {:?}", x); Ok(NetworkResult::value(())) } diff --git a/veilid-flutter/example/pubspec.lock b/veilid-flutter/example/pubspec.lock index 30e5f619..db0901a0 100644 --- a/veilid-flutter/example/pubspec.lock +++ b/veilid-flutter/example/pubspec.lock @@ -77,10 +77,10 @@ packages: dependency: transitive description: name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" cupertino_icons: dependency: "direct main" description: @@ -125,10 +125,10 @@ packages: dependency: transitive description: name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" flutter: dependency: "direct main" description: flutter @@ -432,10 +432,10 @@ packages: dependency: transitive description: name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.4.0" vector_math: dependency: transitive description: diff --git a/veilid-flutter/linux/CMakeLists.txt b/veilid-flutter/linux/CMakeLists.txt index 023d93c1..982e042f 100644 --- a/veilid-flutter/linux/CMakeLists.txt +++ b/veilid-flutter/linux/CMakeLists.txt @@ -20,6 +20,27 @@ target_link_libraries(${PLUGIN_NAME} PRIVATE PkgConfig::GTK) include(./rust.cmake) # List of absolute paths to libraries that should be bundled with the plugin + + +function(get_all_targets var) + set(targets) + get_all_targets_recursive(targets ${CMAKE_CURRENT_SOURCE_DIR}) + set(${var} ${targets} PARENT_SCOPE) +endfunction() + +macro(get_all_targets_recursive targets dir) + get_property(subdirectories DIRECTORY ${dir} PROPERTY SUBDIRECTORIES) + foreach(subdir ${subdirectories}) + get_all_targets_recursive(${targets} ${subdir}) + endforeach() + + get_property(current_targets DIRECTORY ${dir} PROPERTY BUILDSYSTEM_TARGETS) + list(APPEND ${targets} ${current_targets}) +endmacro() + +# get_all_targets(all_targets) +# message("All targets: ${all_targets}") + set(veilid_bundled_libraries "$" PARENT_SCOPE diff --git a/veilid-flutter/linux/rust.cmake b/veilid-flutter/linux/rust.cmake index 5481f710..0e76d497 100644 --- a/veilid-flutter/linux/rust.cmake +++ b/veilid-flutter/linux/rust.cmake @@ -9,7 +9,7 @@ include(FetchContent) FetchContent_Declare( Corrosion GIT_REPOSITORY https://github.com/AndrewGaspar/corrosion.git - GIT_TAG v0.4.4 # Optionally specify a version tag or branch here + GIT_TAG v0.5.0 # Optionally specify a version tag or branch here ) FetchContent_MakeAvailable(Corrosion) @@ -27,5 +27,5 @@ corrosion_import_crate(MANIFEST_PATH ${repository_root}/../veilid/Cargo.toml CRA # Flutter-specific -set(CRATE_NAME "veilid-flutter") +set(CRATE_NAME "veilid_flutter") target_link_libraries(${PLUGIN_NAME} PUBLIC ${CRATE_NAME})