{"id":21930422,"url":"https://github.com/desdaemon/flutter_rust_bridge_template","last_synced_at":"2025-04-09T21:22:55.072Z","repository":{"id":39657017,"uuid":"456982505","full_name":"Desdaemon/flutter_rust_bridge_template","owner":"Desdaemon","description":"Template for Flutter + Rust integration with flutter_rust_bridge.","archived":false,"fork":false,"pushed_at":"2024-09-13T05:49:08.000Z","size":479,"stargazers_count":121,"open_issues_count":4,"forks_count":63,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-02T12:57:47.217Z","etag":null,"topics":["android","cross-platform","ffi","flutter","ios","linux","macos","rust","windows"],"latest_commit_sha":null,"homepage":"https://desdaemon.github.io/flutter_rust_bridge_template/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Desdaemon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-08T15:08:56.000Z","updated_at":"2025-03-30T04:27:21.000Z","dependencies_parsed_at":"2023-01-30T19:45:47.008Z","dependency_job_id":"e7db5d07-b8a7-4fa6-9cf5-0e25aaefc15e","html_url":"https://github.com/Desdaemon/flutter_rust_bridge_template","commit_stats":{"total_commits":95,"total_committers":11,"mean_commits":8.636363636363637,"dds":0.2421052631578947,"last_synced_commit":"49ece27342c58e5f0b231e5793995815d431069f"},"previous_names":[],"tags_count":1,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Desdaemon%2Fflutter_rust_bridge_template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Desdaemon%2Fflutter_rust_bridge_template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Desdaemon%2Fflutter_rust_bridge_template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Desdaemon%2Fflutter_rust_bridge_template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Desdaemon","download_url":"https://codeload.github.com/Desdaemon/flutter_rust_bridge_template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248112944,"owners_count":21049759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","cross-platform","ffi","flutter","ios","linux","macos","rust","windows"],"created_at":"2024-11-28T23:09:22.167Z","updated_at":"2025-04-09T21:22:55.042Z","avatar_url":"https://github.com/Desdaemon.png","language":"C++","readme":"# flutter_rust_bridge_template\n\nThis repository serves as a template for Flutter projects calling into native Rust\nlibraries via `flutter_rust_bridge`.\n\n## Getting Started\n\nTo begin, ensure that you have a working installation of the following items:\n- [Flutter SDK](https://docs.flutter.dev/get-started/install)\n- [Rust language](https://rustup.rs/)\n- `flutter_rust_bridge_codegen` [cargo package](https://cjycode.com/flutter_rust_bridge/integrate/deps.html#build-time-dependencies)\n- Appropriate [Rust targets](https://rust-lang.github.io/rustup/cross-compilation.html) for cross-compiling to your device\n- For Android targets:\n    - Install [cargo-ndk](https://github.com/bbqsrc/cargo-ndk#installing)\n    - Install [Android NDK 22](https://github.com/android/ndk/wiki/Unsupported-Downloads#r22b), then put its path in one of the `gradle.properties`, e.g.:\n\n```\necho \"ANDROID_NDK=..\" \u003e\u003e ~/.gradle/gradle.properties\n```\n\n- For iOS targets:\n  - Install [cargo-xcode](https://gitlab.com/kornelski/cargo-xcode#installation)\n- [Web dependencies](http://cjycode.com/flutter_rust_bridge/template/setup_web.html) for the Web\n\nThen go ahead and run `flutter run` (for web, run `dart run flutter_rust_bridge:serve` instead). When you're ready, refer to our documentation\n[here](https://fzyzcjy.github.io/flutter_rust_bridge/index.html) to learn how to write and use binding code.\n\nOnce you have edited `api.rs` to incorporate your own Rust code, the bridge files `bridge_definitions.dart` and `bridge_generated.dart` are generated using the following command (note: append ` --wasm` to add web support):\n\n### Windows\n```\nflutter_rust_bridge_codegen --rust-input native\\src\\api.rs --dart-output .\\lib\\bridge_generated.dart --dart-decl-output .\\lib\\bridge_definitions.dart\n```\n\n### Linux/MacOS/any other Unix\n```\nflutter_rust_bridge_codegen --rust-input native/src/api.rs --dart-output ./lib/bridge_generated.dart --dart-decl-output ./lib/bridge_definitions.dart\n```\n\n## Scaffolding in existing projects\n\nIf you would like to generate boilerplate for using `flutter_rust_bridge` in your existing projects,\ncheck out the [`flutter_rust_bridge` brick](https://brickhub.dev/bricks/flutter_rust_bridge/)\nfor more details.\n\n## Disclaimer\n\nThis template is not affiliated with flutter_rust_bridge. Please file issues and PRs related to the template here,\nnot flutter_rust_bridge.\n\n## License\n\nCopyright 2022 Viet Dinh.\n\nThis template is licensed under either of\n- [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) ([LICENSE-APACHE](LICENSE-APACHE))\n- [MIT license](https://opensource.org/licenses/MIT) ([LICENSE-MIT](LICENSE-MIT))\n\nat your option.\n\nThe [SPDX](https://spdx.dev/) license identifier for this project is `MIT OR Apache-2.0`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesdaemon%2Fflutter_rust_bridge_template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdesdaemon%2Fflutter_rust_bridge_template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesdaemon%2Fflutter_rust_bridge_template/lists"}