Skip to content

Commit 4fda6f9

Browse files
feat(Common): Add core effect modules for filesystem and language features
- Introduces `FsReader`/`FsWriter` traits and action effects in `fs_effects.rs` to abstract filesystem operations, enabling integration with Mountain's native `River`/`Sun` libraries - Implements `LanguageFeatureProviderRegistry` trait and DTOs in `language_feature_effects.rs` to handle VS Code extension interoperability through Cocoon shims - Adds runtime foundation with `Runtime` trait in `runtime.rs` to execute effects within Mountain's environment - Configures build script to expose package version, supporting version-aware effect handling - Establishes `Library.rs` as central module export for Common element utilities These changes advance MVP Path A by enabling declarative interaction with extension-provided language services and native filesystem operations through the Track dispatcher. The effect system forms the backbone of Cocoon-Mountain communication via Vine IPC, critical for handling VS Code extension API requests through shimmed providers.
1 parent d45f3e6 commit 4fda6f9

File tree

6 files changed

+2060
-13
lines changed

6 files changed

+2060
-13
lines changed

Cargo.toml

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,35 @@
1-
[package]
2-
name = "Common"
3-
version = "0.1.0"
4-
authors.workspace = true
5-
categories.workspace = true
6-
documentation.workspace = true
7-
edition.workspace = true
8-
homepage.workspace = true
9-
license-file.workspace = true
10-
publish.workspace = true
11-
readme.workspace = true
12-
repository.workspace = true
13-
rust-version.workspace = true
1+
[build-dependencies]
2+
serde = { version = "1.0.219", features = ["derive"] }
3+
toml = { version = "0.8.20" }
144

155
[dependencies]
6+
7+
[features]
8+
Development = ["tokio-console"]
9+
default = []
10+
11+
[lib]
12+
crate-type = ["rlib"]
13+
name = "Common"
14+
path = "Source/Library.rs"
15+
16+
[package]
17+
autobenches = false
18+
autobins = false
19+
autoexamples = false
20+
autotests = false
21+
description = "Common 🧑🏻‍🏭"
22+
edition = "2024"
23+
include = [
24+
"Source/**/*",
25+
"LICENSE",
26+
"README.md",
27+
"CHANGELOG.md",
28+
"build.rs",
29+
"Cargo.toml",
30+
]
31+
license-file = "LICENSE"
32+
name = "Common"
33+
publish = false
34+
repository = "https://github.com/CodeEditorLand/Common"
35+
version = "0.0.1"

Source/Library.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
pub mod command_effects;
2+
pub mod config_effects;
3+
pub mod diagnostics_effects;
4+
pub mod document_effects;
5+
pub mod effect;
6+
pub mod environment;
7+
pub mod errors;
8+
pub mod fs_effects;
9+
pub mod ipc_effects;
10+
pub mod language_feature_effects;
11+
pub mod output_effects;
12+
pub mod runtime;
13+
pub mod secrets_effects;
14+
pub mod storage_effects;
15+
pub mod ui_effects;
16+
pub mod workspace_effects;
17+
18+
// Potentially re-export key types for easier access if desired
19+
// pub use errors::CommonError;
20+
// pub use effect::ActionEffect;
21+
// pub use environment::{Environment, Requires};
22+
// pub use runtime::Runtime;

0 commit comments

Comments
 (0)