-
-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Yuki Kishimoto <[email protected]>
- Loading branch information
Showing
2 changed files
with
20 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,4 @@ | ||
#!/usr/bin/env just --justfile | ||
|
||
init: | ||
cargo install flutter_rust_bridge_codegen | ||
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"] | ||
|
||
build: | ||
cd rust && cargo build | ||
|
||
generate: | ||
flutter_rust_bridge_codegen generate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) 2022-2023 Yuki Kishimoto | ||
// Copyright (c) 2023-2024 Rust Nostr Developers | ||
// Distributed under the MIT software license | ||
|
||
use lib_flutter_rust_bridge_codegen::codegen; | ||
use lib_flutter_rust_bridge_codegen::codegen::Config; | ||
|
||
fn main() { | ||
println!("cargo:rerun-if-changed=src/api"); | ||
|
||
// Execute code generator with auto-detected config | ||
codegen::generate( | ||
Config::from_config_file("../flutter_rust_bridge.yaml") | ||
.unwrap() | ||
.unwrap(), | ||
Default::default(), | ||
) | ||
.unwrap(); | ||
} |