mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-15 21:53:59 +03:00
4334865266
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
24 lines
585 B
Rust
24 lines
585 B
Rust
// Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
use std::{
|
|
env::current_dir,
|
|
error::Error,
|
|
fs::File,
|
|
io::{BufWriter, Write},
|
|
};
|
|
|
|
pub fn main() -> Result<(), Box<dyn Error>> {
|
|
let schema = schemars::schema_for!(tauri_utils::config::Config);
|
|
let schema_file_path = current_dir()?.join("schema.json");
|
|
let mut schema_file = BufWriter::new(File::create(&schema_file_path)?);
|
|
write!(
|
|
schema_file,
|
|
"{}",
|
|
serde_json::to_string_pretty(&schema).unwrap()
|
|
)?;
|
|
|
|
Ok(())
|
|
}
|