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/ )   ; [ ![ 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/ )   ; [ ![ 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+
4962Welcome to ** Echo** ! This crate provides a powerful, structured concurrency
5063runtime for Rust applications, built on a high-performance ** work-stealing
5164scheduler** . 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&#x 2001 ; 🔐
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&#x 2001 ; 🏗️
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&#x 2001 ; 🔬
102115
103116To understand how ` Echo ` 's internal components interact to provide these
104117services, 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&#x 2001 ; 📣 + 🏞️
112125
113126This 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&#x 2001 ; 🗺️
152165
153166The ` Echo ` repository is organized into a few core modules with a clear
154167separation of concerns:
@@ -164,9 +177,9 @@ Echo/
164177
165178---
166179
167- ## Getting Started 🚀
180+ ## Getting Started&#x 2001 ; 🚀
168181
169- ### Installation
182+ ### Installation&#x 2001 ; 📥
170183
171184To 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  ; 🚀
190200
1912011 . ** 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-
198206use std :: sync :: Arc ;
199207use Echo :: Scheduler :: SchedulerBuilder ;
200208use Echo :: Task :: Priority ;
201209
202- // Use the fluent builder to configure and build the scheduler
203-
204210let Scheduler = Arc :: new (SchedulerBuilder :: Create (). WithWorkerCount (8 ). Build ());
205211```
206212
2072132 . ** 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-
213217let 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-
222223Scheduler . Submit (MyTask , Priority :: Normal );
223224
224225// Another example with high priority
225-
226226Scheduler . Submit (async { /* critical work */ }, Priority :: High );
227227```
228228
2292293 . ** 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-
237234if 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!&#x 2001 ; 🫱🏻🫲🏿
245242
246243` Echo ` is built on a high-performance foundation, but there's always room to
247244push 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  ; ⚖️
268275
269276This project is released into the public domain under the ** Creative Commons CC0
270277Universal** 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&#x 2001 ; 📜
277284
278285Stay updated with our progress! See
279286[ ` CHANGELOG.md ` ] ( https://github.com/CodeEditorLand/Echo/tree/Current/ ) for a
280287history of changes specific to ** Echo** .
281288
282289---
283290
284- ## Funding & Acknowledgements 🙏🏻
291+ ## Funding \ & Acknowledgements&#x 2001 ; 🙏🏻
285292
286293** Echo** is a core element of the ** Land** ecosystem. This project is funded
287294through [ 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>
0 commit comments