Skip to content

Commit

Permalink
Channel implementation
Browse files Browse the repository at this point in the history
This could be improved with crossbeam_queue in place of the mutex. Using
an existing channel would be nice but flume's Future unregisters the
waker on drop, making implementing it as an intermediate step in the Vm
diffiult as it requires storing the future somewhere.
  • Loading branch information
ecton committed Aug 8, 2024
1 parent 5e13ee3 commit 6602f3e
Show file tree
Hide file tree
Showing 13 changed files with 726 additions and 49 deletions.
9 changes: 9 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[workspace]
members = ["amuse", "muse-lang", "muse-reactor", "muse-ui"]
members = ["amuse", "muse-channel", "muse-lang", "muse-reactor", "muse-ui"]

[workspace.dependencies]
muse = { path = ".", default-features = false }
muse-lang = { path = "muse-lang", default-features = false }
kempt = { version = "0.2.3", features = ["serde"] }
muse-ui = { path = "muse-ui" }
muse-reactor = { version = "0.1.0", path = "muse-reactor" }
muse-channel = { version = "0.1.0", path = "muse-channel" }
cushy = { git = "https://github.com/khonsulabs/cushy" }
alot = "0.3.1"
crossbeam-utils = "0.8.19"
Expand All @@ -27,6 +28,7 @@ license = "MIT OR Apache-2.0"
[features]
default = ["repl"]
reactor = ["dep:muse-reactor"]
channel = ["dep:muse-channel"]
ui = ["dep:muse-ui"]
dispatched = ["muse-lang/dispatched"]
repl = ["dep:rustyline", "dep:ariadne", "dep:dirs"]
Expand All @@ -40,6 +42,7 @@ required-features = ["repl"]
[dependencies]
muse-lang = { workspace = true }
muse-reactor = { workspace = true, optional = true }
muse-channel = { workspace = true, optional = true }
muse-ui = { workspace = true, optional = true }
ariadne = { version = "0.4.0", optional = true }
dirs = { version = "5.0.1", optional = true }
Expand Down
8 changes: 8 additions & 0 deletions muse-channel/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "muse-channel"
version = "0.1.0"
edition = "2021"

[dependencies]
muse-lang = { workspace = true }
parking_lot = { workspace = true }
Loading

0 comments on commit 6602f3e

Please sign in to comment.