aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-08-08 16:37:42 +0800
committer魏曹先生 <1992414357@qq.com>2026-08-08 16:37:42 +0800
commit06bb7a58723d96bd81570900cf6d8295957cef19 (patch)
tree1fa6fd5036b12ba6bfb349dce7703da95e1d1e16
parentd8219ce7e1eab552483056d7058270f166a4d6a7 (diff)
chore: add tscn-to-bsn converter tool scaffolding
Add initial Rust project for converting tscn files to bsn format, including Cargo configuration and Zed editor settings for rust-analyzer with clippy checks enabled.
-rw-r--r--.zed/settings.json23
-rw-r--r--tools/tscn-to-bsn/Cargo.lock244
-rw-r--r--tools/tscn-to-bsn/Cargo.toml9
-rw-r--r--tools/tscn-to-bsn/src/main.rs14
4 files changed, 290 insertions, 0 deletions
diff --git a/.zed/settings.json b/.zed/settings.json
new file mode 100644
index 0000000..23f435d
--- /dev/null
+++ b/.zed/settings.json
@@ -0,0 +1,23 @@
+{
+ "lsp": {
+ "rust-analyzer": {
+ "initialization_options": {
+ "checkOnSave": true,
+ "check": { "command": "clippy" },
+ "files": {
+ "exclude": ["**/target/**", "**/.temp/**"],
+ },
+ "linkedProjects": ["tools/tscn-to-bsn/Cargo.toml"],
+ "cargo": {
+ "features": [],
+ },
+ "procMacro": {
+ "enable": true,
+ "attributes": {
+ "enable": true,
+ },
+ },
+ },
+ },
+ },
+}
diff --git a/tools/tscn-to-bsn/Cargo.lock b/tools/tscn-to-bsn/Cargo.lock
new file mode 100644
index 0000000..ab30c36
--- /dev/null
+++ b/tools/tscn-to-bsn/Cargo.lock
@@ -0,0 +1,244 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 4
+
+[[package]]
+name = "arg-picker"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6bb314536041a4dfa4129b9085d012e795c98850df1bbe1e0b3014ffe4ad6c35"
+dependencies = [
+ "arg-picker-macros",
+ "just_fmt",
+]
+
+[[package]]
+name = "arg-picker-macros"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "45d3bcbbc42ed7d41d773135f30250dbfd5a50db26423c7e8c86a107302fff9a"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "equivalent"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
+
+[[package]]
+name = "hashbrown"
+version = "0.17.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
+
+[[package]]
+name = "indexmap"
+version = "2.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
+dependencies = [
+ "equivalent",
+ "hashbrown",
+]
+
+[[package]]
+name = "just_fmt"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91b935090fce9a995a79798a22d523f1742b202f57ad2d8fcab6ad3dff528baf"
+
+[[package]]
+name = "memchr"
+version = "2.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
+
+[[package]]
+name = "might_be_async"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eca871cea620b07bd2e6da0c883891a25bead698c43a9ab64b0fd663a7a78d5f"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+ "toml",
+]
+
+[[package]]
+name = "mingling"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "becee324d20e7daf63682aa1c4684c61c59ab4e90a53d22e73c344926617456b"
+dependencies = [
+ "arg-picker",
+ "mingling_core",
+ "mingling_macros",
+]
+
+[[package]]
+name = "mingling_core"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "31f68c41c66b24bb19f0b1a963b47761357c1ed88eb313108394ecdf583eac4d"
+dependencies = [
+ "just_fmt",
+ "might_be_async",
+]
+
+[[package]]
+name = "mingling_macros"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6bff950f2ea4dc534375fa93673ac2b119151feeda1f39b48e6873e03365fbe1"
+dependencies = [
+ "just_fmt",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.107"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.47"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "serde"
+version = "1.0.229"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
+dependencies = [
+ "serde_core",
+]
+
+[[package]]
+name = "serde_core"
+version = "1.0.229"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.229"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.3",
+]
+
+[[package]]
+name = "serde_spanned"
+version = "0.6.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.119"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "syn"
+version = "3.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "toml"
+version = "0.8.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362"
+dependencies = [
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_edit",
+]
+
+[[package]]
+name = "toml_datetime"
+version = "0.6.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "toml_edit"
+version = "0.22.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a"
+dependencies = [
+ "indexmap",
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_write",
+ "winnow",
+]
+
+[[package]]
+name = "toml_write"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801"
+
+[[package]]
+name = "tscn-to-bsn"
+version = "0.1.0"
+dependencies = [
+ "mingling",
+]
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
+
+[[package]]
+name = "winnow"
+version = "0.7.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945"
+dependencies = [
+ "memchr",
+]
diff --git a/tools/tscn-to-bsn/Cargo.toml b/tools/tscn-to-bsn/Cargo.toml
new file mode 100644
index 0000000..f2ed7d3
--- /dev/null
+++ b/tools/tscn-to-bsn/Cargo.toml
@@ -0,0 +1,9 @@
+[package]
+name = "tscn-to-bsn"
+version = "0.1.0"
+edition = "2024"
+
+[dependencies]
+mingling = { version = "0.3.0", features = ["extra_macros", "picker"] }
+
+[workspace]
diff --git a/tools/tscn-to-bsn/src/main.rs b/tools/tscn-to-bsn/src/main.rs
new file mode 100644
index 0000000..eb7532c
--- /dev/null
+++ b/tools/tscn-to-bsn/src/main.rs
@@ -0,0 +1,14 @@
+use mingling::prelude::*;
+
+fn main() {
+ let mut program = ThisProgram::new();
+ program.with_dispatcher(CMDConvert);
+ program.exec_and_exit();
+}
+
+dispatcher!("convert");
+
+#[chain]
+fn handle_convert(_args: EntryConvert) {}
+
+gen_program!();