From 681cc734792fd6383813e4e9c57e153c8093ede3 Mon Sep 17 00:00:00 2001 From: David Skrundz Date: Sat, 18 Apr 2026 19:15:34 -0600 Subject: [PATCH] Switch from vscode to zed --- .vscode/extensions.json | 9 --------- .vscode/settings.json | 33 --------------------------------- .zed/settings.json | 28 ++++++++++++++++++++++++++++ Cargo.toml | 33 +++++++++++++++++---------------- architect/Cargo.toml | 11 +++++------ architect/src/output/raw.rs | 3 ++- sample/Cargo.toml | 15 +++++++-------- tombi.toml | 5 +++++ 8 files changed, 64 insertions(+), 73 deletions(-) delete mode 100644 .vscode/extensions.json delete mode 100644 .vscode/settings.json create mode 100644 .zed/settings.json create mode 100644 tombi.toml diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index c70ed43..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "recommendations": [ - "vadimcn.vscode-lldb", - "barbosshack.crates-io", - "usernamehw.errorlens", - "tamasfe.even-better-toml", - "rust-lang.rust-analyzer", - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 2f432d8..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - // VSCode - "editor.detectIndentation": false, - "editor.insertSpaces": false, - "editor.tabSize": 4, - "files.exclude": { - "**/target": true, - "**/Cargo.lock": true, - }, - "files.insertFinalNewline": true, - "files.trimFinalNewlines": true, - "files.trimTrailingWhitespace": true, - "files.watcherExclude": { - "**/.git/**": true, - "**/target/**": true, - }, - // Extensions - "crates.listPreReleases": true, - "evenBetterToml.formatter.alignComments": true, - "evenBetterToml.formatter.alignEntries": false, - "evenBetterToml.formatter.allowedBlankLines": 1, - "evenBetterToml.formatter.arrayAutoExpand": true, - "evenBetterToml.formatter.arrayTrailingComma": true, - "evenBetterToml.formatter.columnWidth": 80, - "evenBetterToml.formatter.reorderKeys": true, - "evenBetterToml.formatter.trailingNewline": true, - "rust-analyzer.imports.granularity.enforce": true, - "rust-analyzer.imports.granularity.group": "module", - "rust-analyzer.imports.group.enable": true, - "rust-analyzer.imports.merge.glob": false, - "rust-analyzer.imports.preferNoStd": true, - "rust-analyzer.showUnlinkedFileNotification": false, -} diff --git a/.zed/settings.json b/.zed/settings.json new file mode 100644 index 0000000..13485f6 --- /dev/null +++ b/.zed/settings.json @@ -0,0 +1,28 @@ +{ + "project_name": null, + + "auto_install_extensions": { + "tombi": true, + "cargo-appraiser": true + }, + + "languages": { + "TOML": { + "format_on_save": "on", + "formatter": { "language_server": { "name": "tombi" } } + } + }, + + "lsp": { + "rust-analyzer": { + "initialization_options": { + "imports": { + "granularity": { "enforce": true, "group": "module" }, + "group": { "enable": true }, + "merge": { "glob": false }, + "preferNoStd": true + } + } + } + } +} diff --git a/Cargo.toml b/Cargo.toml index d1236d6..3da4cc0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,18 +1,18 @@ [workspace] -members = ["architect", "sample"] resolver = "2" +members = ["architect", "sample"] [workspace.package] -authors = [] -edition = "2024" license-file = "LICENSE.md" + +edition = "2024" rust-version = "1.85.0" -[workspace.lints.rust] -arithmetic_overflow = "forbid" -missing_docs = "forbid" -unsafe_code = "forbid" -unused_doc_comments = "forbid" +[workspace.dependencies] +architect = { path = "architect", version = "=0.0.0", default-features = false } +sample = { path = "sample", version = "=0.0.0", default-features = false } + +paste = { version = "^1", default-features = false } [workspace.lints.clippy] arithmetic_side_effects = "forbid" @@ -27,14 +27,15 @@ transmute_undefined_repr = "forbid" unchecked_duration_subtraction = "forbid" unwrap_used = "forbid" +[workspace.lints.rust] +arithmetic_overflow = "forbid" +missing_docs = "forbid" +unsafe_code = "forbid" +unused_doc_comments = "forbid" + [profile.release] -codegen-units = 1 -lto = "fat" opt-level = 3 -overflow-checks = true strip = "debuginfo" - -[workspace.dependencies] -architect = { path = "architect", version = "=0.0.0", default-features = false } - -paste = { version = "^1", default-features = false } +overflow-checks = true +lto = "fat" +codegen-units = 1 diff --git a/architect/Cargo.toml b/architect/Cargo.toml index d00ece2..dd408ba 100644 --- a/architect/Cargo.toml +++ b/architect/Cargo.toml @@ -1,22 +1,21 @@ [package] name = "architect" version = "0.0.0" +license-file.workspace = true -categories = ["development-tools::build-utils"] description = "A cargo interface for build scripts" repository = "https://github.com/QuantumShade/architect" +categories = ["development-tools::build-utils"] -authors.workspace = true edition.workspace = true -license-file.workspace = true rust-version.workspace = true [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] -[lints] -workspace = true - [dependencies] paste = { workspace = true } + +[lints] +workspace = true diff --git a/architect/src/output/raw.rs b/architect/src/output/raw.rs index b8ee356..5a79f48 100644 --- a/architect/src/output/raw.rs +++ b/architect/src/output/raw.rs @@ -12,6 +12,8 @@ //! > against library `bar`, you may want to make sure that library `bar`’s //! > [`cargo::rustc-link-lib`] instruction appears _after_ instructions to link //! > object `foo`. +//! +//! [`cargo::rustc-link-lib`]: https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib /// The `rustc-link-arg` instruction tells Cargo to pass the [`-C link-arg=FLAG` /// option] to the compiler, but only when building supported targets @@ -19,7 +21,6 @@ /// highly platform specific. It is useful to set the shared library version or /// linker script. /// -/// [`cargo::rustc-link-lib`]: https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib /// [`-C link-arg=FLAG` option]: https://doc.rust-lang.org/rustc/codegen-options/index.html#link-arg pub fn rustc_link_arg(flag: &str) { println!("cargo::rustc-link-arg={flag}"); diff --git a/sample/Cargo.toml b/sample/Cargo.toml index f7ec551..ff02023 100644 --- a/sample/Cargo.toml +++ b/sample/Cargo.toml @@ -1,19 +1,17 @@ [package] name = "sample" version = "0.0.0" - -authors.workspace = true -edition.workspace = true license-file.workspace = true + +edition.workspace = true rust-version.workspace = true [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] -[lints.rust] -arithmetic_overflow = "forbid" -unsafe_code = "forbid" +[build-dependencies] +architect = { workspace = true } [lints.clippy] arithmetic_side_effects = "forbid" @@ -28,5 +26,6 @@ transmute_undefined_repr = "forbid" unchecked_duration_subtraction = "forbid" unwrap_used = "deny" -[build-dependencies] -architect = { workspace = true } +[lints.rust] +arithmetic_overflow = "forbid" +unsafe_code = "forbid" diff --git a/tombi.toml b/tombi.toml new file mode 100644 index 0000000..6ee615f --- /dev/null +++ b/tombi.toml @@ -0,0 +1,5 @@ +toml-version = "v1.0.0" + +[format.rules] +indent-style = "tab" +indent-width = 4