Skip to content

Commit

Permalink
fix: add formatting command to build
Browse files Browse the repository at this point in the history
  • Loading branch information
hydra-yse committed Nov 22, 2024
1 parent f900ff9 commit 9051fb6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/core/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use anyhow::*;
use glob::glob;
use std::env;
use std::os::unix::process::CommandExt as _;
use std::process::Command;
use std::result::Result::Ok;

/// Adds a temporary workaround for an issue with the Rust compiler and Android
Expand Down Expand Up @@ -35,8 +37,13 @@ fn setup_x86_64_android_workaround() {
fn compile_protos() -> Result<()> {
tonic_build::configure()
.build_server(false)
.out_dir("./src/sync/model")
.out_dir("src/sync/model")
.compile_protos(&["src/sync/proto/sync.proto"], &["src/sync/proto"])?;
Command::new("rustfmt")
.arg("--edition")
.arg("2021")
.arg("src/sync/model/sync.rs")
.exec();
Ok(())
}

Expand Down

0 comments on commit 9051fb6

Please sign in to comment.