Skip to content

Commit d1ec123

Browse files
Merge branch 'Current' into dependabot/github_actions/actions/cache-5.0.4
2 parents b86a94f + f438390 commit d1ec123

File tree

8 files changed

+88
-49
lines changed

8 files changed

+88
-49
lines changed

.github/Update.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Update: Fri Feb 27 01:08:34 UTC 2026
1+
Update: Sun Apr 5 01:23:51 UTC 2026

.github/workflows/Dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
if: ${{ github.actor == 'dependabot[bot]' }}
2121

2222
steps:
23-
- uses: dependabot/fetch-metadata@v2.5.0
23+
- uses: dependabot/fetch-metadata@v3.0.0
2424
with:
2525
github-token: "${{ secrets.GITHUB_TOKEN }}"
2626

@@ -35,7 +35,7 @@ jobs:
3535
if: ${{ github.actor == 'dependabot[bot]' }}
3636

3737
steps:
38-
- uses: dependabot/fetch-metadata@v2.5.0
38+
- uses: dependabot/fetch-metadata@v3.0.0
3939
with:
4040
github-token: "${{ secrets.GITHUB_TOKEN }}"
4141

.github/workflows/Node.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
steps:
6262
- uses: actions/checkout@v6.0.2
6363

64-
- uses: pnpm/action-setup@v4.2.0
64+
- uses: pnpm/action-setup@v5.0.0
6565
with:
6666
version: 9.3.0
6767
run_install: |

Documentation/Rust

Submodule Rust updated 80 files

README.md

Lines changed: 46 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,26 @@
3939

4040
---
4141

42-
# **Echo** 📣 A Resilient, High-Performance Task Scheduler for Rust
42+
# **Echo** 📣
43+
44+
A Resilient, High-Performance Task Scheduler for Rust
45+
46+
> **VS Code's background tasks (file indexing, symbol scanning, git blame) run
47+
> in a single-threaded Node.js process. Heavy indexing freezes everything on
48+
> that thread. The only escape is spawning more processes, adding memory and IPC
49+
> overhead.**
50+
51+
_"Indexing, search, and builds run on every CPU core in parallel. The editor
52+
stays responsive."_
4353

4454
[![License: CC0-1.0](https://img.shields.io/badge/License-CC0_1.0-lightgrey.svg)](https://github.com/CodeEditorLand/Echo/tree/Current/LICENSE)
45-
[![Crates.io](https://img.shields.io/crates/v/Echo.svg)](https://crates.io/crates/Echo)
55+
[<img src="https://editor.land/Image/Rust.svg" width="14" alt="Rust" />](https://www.rust-lang.org/)&#x2001;[![Crates.io](https://img.shields.io/crates/v/Echo.svg)](https://crates.io/crates/Echo)
56+
[<img src="https://editor.land/Image/Rust.svg" width="14" alt="Rust" />](https://www.rust-lang.org/)&#x2001;[![Rust Version](https://img.shields.io/badge/Rust-1.75+-orange.svg)](https://www.rust-lang.org/)
4657
[![Tokio Version](https://img.shields.io/badge/Tokio-v1-blue.svg)](https://tokio.rs/)
4758
[![Crossbeam Version](https://img.shields.io/badge/Crossbeam-blueviolet.svg)](https://github.com/crossbeam-rs/crossbeam)
4859

60+
📖 **[Rust API Documentation](https://Rust.Documentation.Editor.Land/Echo/)**
61+
4962
Welcome to **Echo**! This crate provides a powerful, structured concurrency
5063
runtime for Rust applications, built on a high-performance **work-stealing
5164
scheduler**. It is designed to be the core execution engine for application
@@ -69,7 +82,7 @@ executing complex asynchronous workflows with resilience and efficiency.
6982

7083
---
7184

72-
## Key Features🔐
85+
## Key Features&#x2001;🔐
7386

7487
- **Work-Stealing Scheduler:** Implements a modern, priority-aware work-stealing
7588
algorithm to efficiently distribute tasks across a pool of worker threads.
@@ -86,7 +99,7 @@ executing complex asynchronous workflows with resilience and efficiency.
8699

87100
---
88101

89-
## Core Architecture Principles🏗️
102+
## Core Architecture Principles&#x2001;🏗️
90103

91104
| Principle | Description | Key Components Involved |
92105
| :------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------ |
@@ -98,7 +111,7 @@ executing complex asynchronous workflows with resilience and efficiency.
98111

99112
---
100113

101-
## Deep Dive & Component Breakdown🔬
114+
## Deep Dive & Component Breakdown&#x2001;🔬
102115

103116
To understand how `Echo`'s internal components interact to provide these
104117
services, please refer to the detailed technical breakdown in
@@ -108,7 +121,7 @@ This document explains the roles of the `Task`, `StealingQueue`, `Worker`, and
108121

109122
---
110123

111-
## `Echo` in the Land Ecosystem 📣 + 🏞️
124+
## `Echo` in the Land Ecosystem&#x2001;📣 + 🏞️
112125

113126
This diagram illustrates `Echo`'s role as the core execution engine within the
114127
`Mountain` backend.
@@ -148,7 +161,7 @@ graph LR
148161

149162
---
150163

151-
## Project Structure Overview🗺️
164+
## Project Structure Overview&#x2001;🗺️
152165

153166
The `Echo` repository is organized into a few core modules with a clear
154167
separation of concerns:
@@ -164,9 +177,9 @@ Echo/
164177

165178
---
166179

167-
## Getting Started🚀
180+
## Getting Started&#x2001;🚀
168181

169-
### Installation
182+
### Installation&#x2001;📥
170183

171184
To add `Echo` to your project, add the following to your `Cargo.toml`:
172185

@@ -183,65 +196,49 @@ Echo = { git = "https://github.com/CodeEditorLand/Echo.git", branch = "Current"
183196
- `log = "*"`
184197
- `num_cpus = "*"`
185198

186-
### Usage
187-
188-
`Echo` is designed to be integrated into an application's main entry point and
189-
used throughout the application, often via a shared context or runtime.
199+
### Usage&#x2001;🚀
190200

191201
1. **Initialize the Scheduler:** Create and start the scheduler when your
192202
application starts. It is typically wrapped in an `Arc` to be shared safely
193203
across your application.
194204

195205
```rust
196-
// In your application's main function
197-
198206
use std::sync::Arc;
199207
use Echo::Scheduler::SchedulerBuilder;
200208
use Echo::Task::Priority;
201209

202-
// Use the fluent builder to configure and build the scheduler
203-
204210
let Scheduler = Arc::new(SchedulerBuilder::Create().WithWorkerCount(8).Build());
205211
```
206212

207213
2. **Submit Tasks:** Use the `Scheduler` instance to submit asynchronous work
208214
from anywhere in your application.
209215

210216
```rust
211-
// An example async block to be run by the scheduler
212-
213217
let MyTask = async {
214-
println!("This is running on an Echo worker thread!");
215-
216-
// ... perform some work ...
217-
218+
println!("This is running on an Echo worker thread!");
219+
// ... perform some work ...
218220
};
219221

220222
// Submit the task with a desired priority
221-
222223
Scheduler.Submit(MyTask, Priority::Normal);
223224

224225
// Another example with high priority
225-
226226
Scheduler.Submit(async { /* critical work */ }, Priority::High);
227227
```
228228

229229
3. **Graceful Shutdown:** Before your application exits, ensure a clean
230230
shutdown of all worker threads.
231231

232232
```rust
233-
// In your application's shutdown sequence
234-
235233
// Note: Arc::try_unwrap requires the Arc to have only one strong reference.
236-
237234
if let Ok(mut Scheduler) = Arc::try_unwrap(Scheduler) {
238-
Scheduler.Stop().await;
235+
Scheduler.Stop().await;
239236
}
240237
```
241238

242239
---
243240

244-
## Help Us Boost Performance: A Call for Contributions!🫱🏻‍🫲🏿
241+
## Help Us Boost Performance: A Call for Contributions!&#x2001;🫱🏻‍🫲🏿
245242

246243
`Echo` is built on a high-performance foundation, but there's always room to
247244
push the boundaries of speed and efficiency. We maintain a detailed roadmap of
@@ -255,7 +252,7 @@ levels.
255252
| **Expert Tuning** | Build a `criterion` benchmark suite; implement CPU pinning. |
256253
| **Advanced Logic** | Introduce an anti-starvation mechanism for tasks. |
257254

258-
**Interested in tackling one of these challenges?**👉🏻
255+
**Interested in tackling one of these challenges?** 👉🏻
259256

260257
- **[Check out our full TODO](https://github.com/CodeEditorLand/Echo/tree/Current/Documentation/GitHub/Todo.md)**
261258
for challenges!
@@ -264,7 +261,17 @@ levels.
264261

265262
---
266263

267-
## License ⚖️
264+
## See Also
265+
266+
- [Echo Documentation](https://editor.land/Doc/echo)
267+
- [Architecture Overview](https://editor.land/Doc/architecture)
268+
- [Why Rust](https://editor.land/Doc/why-rust)
269+
- [Mountain](https://github.com/CodeEditorLand/Mountain)
270+
- [Common](https://github.com/CodeEditorLand/Common)
271+
272+
---
273+
274+
## License&#x2001;⚖️
268275

269276
This project is released into the public domain under the **Creative Commons CC0
270277
Universal** license. You are free to use, modify, distribute, and build upon
@@ -273,22 +280,27 @@ see the [`LICENSE`](https://github.com/CodeEditorLand/Echo/tree/Current/) file.
273280

274281
---
275282

276-
## Changelog📜
283+
## Changelog&#x2001;📜
277284

278285
Stay updated with our progress! See
279286
[`CHANGELOG.md`](https://github.com/CodeEditorLand/Echo/tree/Current/) for a
280287
history of changes specific to **Echo**.
281288

282289
---
283290

284-
## Funding & Acknowledgements🙏🏻
291+
## Funding \& Acknowledgements&#x2001;🙏🏻
285292

286293
**Echo** is a core element of the **Land** ecosystem. This project is funded
287294
through [NGI0 Commons Fund](https://NLnet.NL/commonsfund), a fund established by
288295
[NLnet](https://NLnet.NL) with financial support from the European Commission's
289296
[Next Generation Internet](https://ngi.eu) program. Learn more at the
290297
[NLnet project page](https://NLnet.NL/project/Land).
291298

299+
The project is operated by PlayForm, based in Sofia, Bulgaria.
300+
301+
PlayForm acts as the open-source steward for Code Editor Land under the NGI0
302+
Commons Fund grant.
303+
292304
<table>
293305
<thead>
294306
<tr>

Source/Library.rs

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,37 @@
11
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
22
#![allow(non_snake_case, non_camel_case_types, non_upper_case_globals)]
33

4-
//! # Echo: A Resilient, High-Performance Task Scheduler
4+
//! # Echo: Work-Stealing Task Scheduler
55
//!
6-
//! Provides a structured concurrency runtime for Rust applications, built on a
7-
//! high-performance, priority-aware, work-stealing scheduler. It is designed
8-
//! to be a robust and efficient core execution engine for demanding,
9-
//! concurrent workloads.
6+
//! Echo keeps every CPU core busy. It uses a lock-free work-stealing queue
7+
//! (`crossbeam-deque`) so that idle threads automatically pick up tasks from
8+
//! busy ones. No central bottleneck, no wasted cores.
9+
//!
10+
//! ## Why Echo Instead of `tokio::spawn`
11+
//!
12+
//! Tokio is great for I/O-bound work, but CPU-bound tasks (parsing, diffing,
13+
//! indexing) block the executor. Echo provides:
14+
//!
15+
//! - **Priority levels**: UI-blocking tasks pre-empt background indexing
16+
//! - **Work stealing**: Idle workers take from busy workers' queues
17+
//! - **Structured shutdown**: Graceful drain with timeout
18+
//!
19+
//! ## Usage
20+
//!
21+
//! ```rust,ignore
22+
//! use Echo::Scheduler::SchedulerBuilder;
23+
//! use Echo::Task::Priority;
24+
//!
25+
//! let Scheduler = SchedulerBuilder::new().Workers(4).Build();
26+
//! Scheduler.Submit(Priority::High, async { /* critical work */ });
27+
//! Scheduler.Submit(Priority::Low, async { /* background indexing */ });
28+
//! ```
29+
//!
30+
//! ## Modules
31+
//!
32+
//! - [`Scheduler`]: Builder and runtime for the worker pool
33+
//! - [`Queue`]: Lock-free work-stealing deque wrapper
34+
//! - [`Task`]: Task definition with priority levels
1035
1136
// --- Crate Modules ---
1237
// Declares the main modules that constitute the library.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
"@codeeditorland/common": "0.0.6"
2929
},
3030
"devDependencies": {
31-
"@cloudflare/workers-types": "4.20260305.0",
32-
"@playform/build": "0.3.0",
31+
"@cloudflare/workers-types": "4.20260403.1",
32+
"@playform/build": "0.3.1",
3333
"@types/dotenv": "8.2.3",
34-
"miniflare": "4.20260305.0",
35-
"wrangler": "4.69.0"
34+
"miniflare": "4.20260401.0",
35+
"wrangler": "4.80.0"
3636
},
3737
"publishConfig": {
3838
"access": "public",

tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
"outDir": "Target",
1212

13-
"types": ["@cloudflare/workers-types/experimental", "@types/node"]
13+
"types": ["@cloudflare/workers-types/experimental", "@types/node"],
14+
15+
"rootDir": "./Source"
1416
},
1517

1618
"extends": "@playform/build/tsconfig",

0 commit comments

Comments
 (0)