Skip to content

Commit 439f42f

Browse files
authored
refactor(core): crate 统一放到 rust/crates/,删除社区命令、wasm 入口和未使用依赖 (#26)
* refactor(core): 删除社区命令、wasm 入口和未使用依赖 - 删除 community.discourse.* 七个命令、实现和 fixture,桌面端已不再调用 - lithe-core-rules 去掉 wasm 入口和 cdylib,只作为 rlib 链接进 Core - lithe-core 删除未使用的 reqwest、rsa、sha1、shell-words、toml_edit 依赖,去掉 num-bigint-dig 专用 profile - 修复工作区编译警告:host_failure 显式处理 BACKEND_EXITED(错误码保留,仍映射为 plugin.host.failed)、限定 forward_slash_path 的编译条件、收窄 network 重导出 - 新增 unparseable_requests_fail_without_an_id 测试 * refactor(core): crate 统一放到 rust/crates/,注释门禁覆盖全部 crate - 六个 crate 从 rust/lithe-*/ 移到 rust/crates/<包名去掉 lithe- 前缀>/,包名不变;工作区成员改为 crates/* - 同步更新路径引用:Cargo 路径依赖、SDK e2e 测试路径、fixture 和契约文档里的源码路径、README 目录表 - C 头文件的位置变为 rust/crates/core/include/lithe_core.h - 注释门禁改为遍历 rust/crates/ 下的全部 crate;lithe-remote 缺 404 处公开项文档(1lck/Lithe-IDEA#1863),暂时只跳过它的 missing_docs,链接检查照常进行 - 为 lithe-git-host、lithe-ide-host 的公开项补齐文档,把 log-exempt 注释改成英文 - search_index 测试的权限写成八进制 0o000,修复 clippy 的 deny 级 lint
1 parent f113e9e commit 439f42f

443 files changed

Lines changed: 602 additions & 2325 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ Lithe 的跨平台应用内核,以及插件契约、插件开发资料和官
44

55
| 目录 | 内容 |
66
| --- | --- |
7-
| [`rust/`](rust) | Rust Core 各 crate,以及 Core 自己的接口契约 `rust/contracts/`、测试数据 `rust/fixtures/` 和日志事件目录 `rust/logging/` |
7+
| [`rust/crates/`](rust/crates) | Rust Core 的 crate,每个子目录是一个 crate,目录名是包名去掉 `lithe-` 前缀 |
8+
| [`rust/contracts/`](rust/contracts) | Core 命令的接口契约和 schema |
9+
| [`rust/fixtures/`](rust/fixtures) | Core 命令的测试数据,Core 测试和桌面端测试共用 |
10+
| [`rust/logging/`](rust/logging) | 日志事件目录 |
811
| [`shared/plugins/`](shared/plugins) | 插件契约 `contract/v1/`、开发指南 `guides/`、参考 `reference/`、官方 SDK `sdk/{node,java,rust}` 和它们的端到端测试 |
912
| [`scripts/rust-core/`](scripts/rust-core) | Rust Core 注释规范检查(模块文档、英文注释、`unsafe` 安全说明、导出项 Rustdoc) |
1013

@@ -19,8 +22,8 @@ node shared/plugins/scripts/verify-docs.mjs # 契约 $id 与文档
1922
node shared/plugins/scripts/sdk-e2e.mjs # 三个 SDK 对当前 Core 的端到端测试
2023
```
2124

22-
修改 `shared/plugins/contract/v1/`、`rust/lithe-core/src/plugins/capabilities.rs` 或
23-
`rust/lithe-core/src/lsp/interface/plugin_function.rs` 的 PR,要在同一个 PR 里更新
25+
修改 `shared/plugins/contract/v1/`、`rust/crates/core/src/plugins/capabilities.rs` 或
26+
`rust/crates/core/src/lsp/interface/plugin_function.rs` 的 PR,要在同一个 PR 里更新
2427
[协议更新记录](shared/plugins/reference/protocol-changelog.md)。
2528

2629
---
@@ -31,10 +34,13 @@ Lithe's cross-platform application core, and the single source of the plugin con
3134

3235
| Directory | Contents |
3336
| --- | --- |
34-
| [`rust/`](rust) | The Rust Core crates, plus Core's own interface contracts `rust/contracts/`, test data `rust/fixtures/` and logging event catalog `rust/logging/` |
37+
| [`rust/crates/`](rust/crates) | The Rust Core crates; each directory is one crate, named after its package without the `lithe-` prefix |
38+
| [`rust/contracts/`](rust/contracts) | Interface contracts and schemas for Core commands |
39+
| [`rust/fixtures/`](rust/fixtures) | Test data for Core commands, shared by the Core and desktop tests |
40+
| [`rust/logging/`](rust/logging) | The logging event catalog |
3541
| [`shared/plugins/`](shared/plugins) | The plugin contract `contract/v1/`, guides `guides/`, reference `reference/`, the official SDKs `sdk/{node,java,rust}` and their end-to-end tests |
3642
| [`scripts/rust-core/`](scripts/rust-core) | The Rust Core comment rules check (module docs, English comments, `unsafe` safety sections, Rustdoc on exported items) |
3743

3844
**Plugin authors** start at [`shared/plugins/README.md`](shared/plugins/README.md) and never need to clone the Lithe application repository.
3945

40-
A pull request that changes `shared/plugins/contract/v1/`, `rust/lithe-core/src/plugins/capabilities.rs` or `rust/lithe-core/src/lsp/interface/plugin_function.rs` updates the [protocol changelog](shared/plugins/reference/protocol-changelog.md) in the same pull request.
46+
A pull request that changes `shared/plugins/contract/v1/`, `rust/crates/core/src/plugins/capabilities.rs` or `rust/crates/core/src/lsp/interface/plugin_function.rs` updates the [protocol changelog](shared/plugins/reference/protocol-changelog.md) in the same pull request.

0 commit comments

Comments
 (0)