Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0ae7f2b
adds changelog entry
patmuk Jun 20, 2025
80b0c4b
lint: inlines variables in format!
patmuk Jun 20, 2025
a7d3019
rewrites documentation
patmuk Jun 20, 2025
0f9ae88
removes oppinionated logging
patmuk Jun 20, 2025
ecfaa52
removes dependencies of old logging
patmuk Jun 20, 2025
a9559fb
removes build file changes for old logging
patmuk Jun 20, 2025
84fb66e
fixes build artefacts
patmuk Jun 23, 2025
b6cebe5
adds new files
patmuk Jun 20, 2025
faa62e3
includes new files
patmuk Jun 20, 2025
fe7148f
adds dependencies for new logging
patmuk Jun 20, 2025
01680ad
adds build file changes for new logging
patmuk Jun 20, 2025
d46bf21
adds test dependencies
patmuk Jun 20, 2025
ef47bbf
injects dependency into lib.rs
patmuk Jun 20, 2025
0f20ebd
adds new example project for logging
patmuk Jun 25, 2025
dec6047
fixes codacy issues
patmuk Jul 1, 2025
4c39d58
clarifies which setup steps are needed when
patmuk Jul 2, 2025
4013de8
improves lib.rs code injection to be more automagical
patmuk Jul 3, 2025
1f80b36
changes the example to have a specified rust_output
patmuk Jul 3, 2025
55d06ac
adapts generates lib.rs files
patmuk Jul 3, 2025
a558443
makes initLogger optional
patmuk Jul 3, 2025
fd8a011
updates the documentation
patmuk Jul 3, 2025
ed549ee
CI upgrades windows-2019 to windows-2025
patmuk Jul 6, 2025
cb8df76
Merge branch 'master' into logging_overhaul_reredo
patmuk Jul 6, 2025
628b56c
upgrades FRB to 2.11.1 in the dart_logging example
patmuk Jul 7, 2025
589e12d
upgrades build artefacts
patmuk Jul 7, 2025
723a930
changes visibility of the generated mod
patmuk Sep 2, 2025
969c83e
Merge branch 'master' into logging_overhaul_reredo
patmuk Nov 11, 2025
7d5986e
fixes an error when platform.environment is unsupported (like on web)
patmuk Jan 6, 2026
17711b0
Merge branch 'master' into logging_overhaul_reredo
patmuk Feb 18, 2026
fcc26ee
Merge branch 'master' into logging_overhaul_reredo
fzyzcjy May 10, 2026
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
30 changes: 1 addition & 29 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,7 @@
# Changelog

## 2.12.0

* Please refer to https://fzyzcjy.github.io/flutter_rust_bridge/guides/miscellaneous/whats-new for what's changed in V2.
* Add `no_dart_fix`, `no_dart_format` and `no_write_lib` to `flutter_rust_bridge_codegen integrate` #2790 (thanks @xuxiaocheng0201)
* Check for target dependencies when auto upgrading in codegen #2805 (thanks @turtletongue)
* Update troubleshooting.md #2806
* Run scheduled CIs only when the repo owner is correct #2817 (thanks @AlexV525)
* Use `fvm install` to prevent `flutter_rust_bridge_codegen generate` from hanging #2834 (thanks @ethicnology)
* Support having a different crate name than the Flutter plugin #2859 (thanks @NathanKolbas)
* Update GitHub CI workflow to use new iOS simulators #2866 (thanks @NathanKolbas)
* Add resolution in yaml struct and workspace root resolution logic #2872 (thanks @AadamZ5)
* Update actions versions of all workflows #2876 (thanks @h3x4d3c1m4l)
* Add support for optional publish tag in release workflow #2877 (thanks @h3x4d3c1m4l)
* Support multiple flutter_rust_bridge packages on web #2903 (thanks @dt-iohk)
* Add encoded types DCO support #2905 (thanks @SilverMira)
* Fix Windows 10 `flutter_rust_bridge_codegen build-web` failure #2906 (thanks @marcmcd)
* Use `Vec::with_capacity` instead of `vec![]` in SSE vector decode #2926 (thanks @Shadowcat650)
* Fix unhandled error in dart_fn_handle_output when sending message #2941 (thanks @khangah)
* Upgrade versions and CI #2951 #2934 #2810 #2918 #2932 #2811
* Added suggestion to update cargo in troubleshooting.md #2955 (thanks @dgasparri)
* Regenerate tests #2973 #2982 (thanks @TrackerSB)
* Add DevContainer and Dockerfile #2981
* Add Claude skills and enhance development guidance #2983
* Add upgrade notice to V1 documentation pages #2984
* Add web test support to skills and Dockerfile #2986
* Update PR template and tips #2989
* Revise troubleshooting steps for Cargokit and Flutter #2994 (thanks @liruohrh)
* Fix web build with latest wasm-bindgen/js-sys versions #3010
* Create docker image for development #3025
* Add configurable log levels to setup functions #3026 (thanks @futpib)
* Overhaul of the logging implementation, from an opinionated approach to a configurable one. Please consult the [documentation](https://fzyzcjy.github.io/flutter_rust_bridge/guides/logging) for more information. If you implemented logging yourself you might have to migrate your changes.

## 2.11.1

Expand Down
44 changes: 2 additions & 42 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ exclude = [
# Exclude example packages to ensure the example mimics how a typical user will use it.
# For example, the `target` directory is different with and without workspaces.
"frb_example/dart_minimal/rust",
"frb_example/dart_logging/rust",
"frb_example/deliberate_bad/rust",
"frb_example/flutter_via_create/rust",
"frb_example/flutter_via_integrate/rust",
Expand Down

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

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ crate-type = ["cdylib", "staticlib"]

[dependencies]
flutter_rust_bridge = REPLACE_ME_RUST_FRB_DEPENDENCY
# Optional - can be removed if you do not want logging
log = "^0.4.20"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
pub mod api;
// AUTO INJECTED BY flutter_rust_bridge.
// The following lines may not be accurate; change them according to your needs.
mod frb_generated;
// END of AUTO INJECTED code

pub mod api;
8 changes: 0 additions & 8 deletions frb_codegen/src/binary/commands_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ mod tests {
use crate::binary::test_utils::set_cwd_test_fixture;
use clap::Parser;
use itertools::concat;
use lib_flutter_rust_bridge_codegen::utils::logs::configure_opinionated_test_logging;
use lib_flutter_rust_bridge_codegen::{codegen, if_then_some};
use serial_test::serial;

Expand All @@ -89,7 +88,6 @@ mod tests {
#[serial]
fn test_compute_codegen_config_mode_from_files_auto_flutter_rust_bridge_yaml(
) -> anyhow::Result<()> {
configure_opinionated_test_logging();
set_cwd_test_fixture("binary/commands_parser/flutter_rust_bridge_yaml")?;

let config = run_command_line(vec!["", "generate"])?;
Expand All @@ -102,7 +100,6 @@ mod tests {
#[test]
#[serial]
fn test_compute_codegen_config_mode_from_files_auto_pubspec_yaml() -> anyhow::Result<()> {
configure_opinionated_test_logging();
set_cwd_test_fixture("binary/commands_parser/pubspec_yaml")?;

let config = run_command_line(vec!["", "generate"])?;
Expand All @@ -116,7 +113,6 @@ mod tests {
#[serial]
fn test_compute_codegen_config_mode_from_files_auto_pubspec_yaml_faulty() -> anyhow::Result<()>
{
configure_opinionated_test_logging();
set_cwd_test_fixture("binary/commands_parser/faulty_pubspec_yaml")?;

let result = run_command_line(vec!["", "generate"]);
Expand All @@ -134,7 +130,6 @@ mod tests {
#[test]
#[serial]
fn test_compute_codegen_config_mode_config_file() -> anyhow::Result<()> {
configure_opinionated_test_logging();
set_cwd_test_fixture("binary/commands_parser/config_file")?;

let config = run_command_line(vec!["", "generate", "--config-file", "hello.yaml"])?;
Expand All @@ -147,7 +142,6 @@ mod tests {
#[test]
#[serial]
fn test_compute_codegen_config_mode_config_file_faulty_file() -> anyhow::Result<()> {
configure_opinionated_test_logging();
set_cwd_test_fixture("binary/commands_parser/flutter_rust_bridge_yaml")?;
let result = run_command_line(vec![
"",
Expand All @@ -168,7 +162,6 @@ mod tests {
#[test]
#[serial]
fn test_compute_codegen_config_mode_from_naive_generate_command_args() {
configure_opinionated_test_logging();
set_cwd_test_fixture("binary/commands_parser").unwrap(); // use whatever folder without config file

// bool flags
Expand Down Expand Up @@ -196,7 +189,6 @@ mod tests {
#[test]
#[serial]
fn test_compute_codegen_config_from_both_file_and_command_line() -> anyhow::Result<()> {
configure_opinionated_test_logging();
set_cwd_test_fixture("binary/commands_parser/flutter_rust_bridge_yaml")?;

let config = run_command_line(vec!["", "generate", "--llvm-path", "/my/path"])?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ mod tests {
use crate::codegen::config::config::MetaConfig;
use crate::codegen::config::internal_config::InternalConfig;
use crate::codegen::Config;
use crate::utils::logs::configure_opinionated_test_logging;
use crate::utils::test_utils::{
create_path_sanitizers, get_test_fixture_dir, json_golden_test,
};
Expand All @@ -229,7 +228,6 @@ mod tests {
}

fn body(fixture_name: &str) -> anyhow::Result<()> {
configure_opinionated_test_logging();
let test_fixture_dir = get_test_fixture_dir(fixture_name);
env::set_current_dir(&test_fixture_dir)?;
info!("test_fixture_dir={test_fixture_dir:?}");
Expand Down
2 changes: 0 additions & 2 deletions frb_codegen/src/library/codegen/generator/api_dart/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ mod tests {
use crate::codegen::generator::api_dart::generate;
use crate::codegen::misc::GeneratorProgressBarPack;
use crate::codegen::Config;
use crate::utils::logs::configure_opinionated_test_logging;
use crate::utils::test_utils::{get_test_fixture_dir, text_golden_test};
use serial_test::serial;
use std::collections::HashMap;
Expand Down Expand Up @@ -82,7 +81,6 @@ mod tests {
}

fn body(fixture_name: &str, expect_outputs: HashMap<&str, &str>) -> anyhow::Result<()> {
configure_opinionated_test_logging();
let test_fixture_dir = get_test_fixture_dir(fixture_name);
env::set_current_dir(&test_fixture_dir)?;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub(crate) fn sanity_check_class_name_duplicates(
);

if std::env::var(SKIP_ENV_VAR).is_ok() {
warn!("{}", message);
warn!("{message}",);
} else {
bail!(
"{}Another way to debug is to temporarily set environment variable `{}=1` and check the generated code.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,7 @@ fn transform_module_by_pub_use_single(
if let Some(src_mod) = module.get_module_nested(&pub_use_info.namespace.path()) {
// Codecov seems to be buggy by saying this line is not covered (while lines above/below) are
// frb-coverage:ignore-start
log::debug!(
"transform_module_by_pub_use_single pub_use_info={:?}",
pub_use_info
);
log::debug!("transform_module_by_pub_use_single pub_use_info={pub_use_info:?}");
// frb-coverage:ignore-end

if src_mod.meta.is_public() {
Expand Down
2 changes: 0 additions & 2 deletions frb_codegen/src/library/codegen/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ mod tests {
ParserMirInternalConfig, RustInputNamespacePack,
};
use crate::codegen::parser::{parse_inner, MirPack};
use crate::utils::logs::configure_opinionated_test_logging;
use crate::utils::namespace::Namespace;
use crate::utils::test_utils::{
create_path_sanitizers, get_test_fixture_dir, json_golden_test,
Expand Down Expand Up @@ -157,7 +156,6 @@ mod tests {
fixture_name: &str,
rust_input_namespace_pack: Option<Box<dyn Fn(&Path) -> RustInputNamespacePack>>,
) -> anyhow::Result<(MirPack, PathBuf)> {
configure_opinionated_test_logging();
let test_fixture_dir = get_test_fixture_dir(fixture_name);
let rust_crate_dir = test_fixture_dir.clone();
info!("test_fixture_dir={test_fixture_dir:?}");
Expand Down
Loading
Loading