Skip to content

Commit

Permalink
Move mlua-luau-scheduler into this repository
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptibell committed Jun 5, 2024
1 parent 5a292aa commit 2a85532
Show file tree
Hide file tree
Showing 35 changed files with 2,436 additions and 10 deletions.
163 changes: 160 additions & 3 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ members = [
"crates/lune-std-stdio",
"crates/lune-std-task",
"crates/lune-utils",
"crates/mlua-luau-scheduler",
]

# Profile for building the release binary, with the following options set:
Expand Down
2 changes: 1 addition & 1 deletion crates/lune-std-net/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ workspace = true

[dependencies]
mlua = { version = "0.9.7", features = ["luau"] }
mlua-luau-scheduler = "0.0.2"
mlua-luau-scheduler = { version = "0.0.2", path = "../mlua-luau-scheduler" }

bstr = "1.9"
futures-util = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion crates/lune-std-process/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ workspace = true

[dependencies]
mlua = { version = "0.9.7", features = ["luau"] }
mlua-luau-scheduler = "0.0.2"
mlua-luau-scheduler = { version = "0.0.2", path = "../mlua-luau-scheduler" }

directories = "5.0"
pin-project = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/lune-std-roblox/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ workspace = true

[dependencies]
mlua = { version = "0.9.7", features = ["luau"] }
mlua-luau-scheduler = "0.0.2"
mlua-luau-scheduler = { version = "0.0.2", path = "../mlua-luau-scheduler" }

once_cell = "1.17"
rbx_cookie = { version = "0.1.4", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion crates/lune-std-stdio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ workspace = true
[dependencies]
dialoguer = "0.11"
mlua = { version = "0.9.7", features = ["luau"] }
mlua-luau-scheduler = "0.0.2"
mlua-luau-scheduler = { version = "0.0.2", path = "../mlua-luau-scheduler" }

tokio = { version = "1", default-features = false, features = [
"io-std",
Expand Down
2 changes: 1 addition & 1 deletion crates/lune-std-task/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ workspace = true

[dependencies]
mlua = { version = "0.9.7", features = ["luau"] }
mlua-luau-scheduler = "0.0.2"
mlua-luau-scheduler = { version = "0.0.2", path = "../mlua-luau-scheduler" }

tokio = { version = "1", default-features = false, features = ["time"] }

Expand Down
2 changes: 1 addition & 1 deletion crates/lune-std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ task = ["dep:lune-std-task"]

[dependencies]
mlua = { version = "0.9.7", features = ["luau"] }
mlua-luau-scheduler = "0.0.2"
mlua-luau-scheduler = { version = "0.0.2", path = "../mlua-luau-scheduler" }

serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/lune/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ workspace = true

[dependencies]
mlua = { version = "0.9.7", features = ["luau"] }
mlua-luau-scheduler = "0.0.2"
mlua-luau-scheduler = { version = "0.0.2", path = "../mlua-luau-scheduler" }

anyhow = "1.0"
console = "0.15"
Expand Down
67 changes: 67 additions & 0 deletions crates/mlua-luau-scheduler/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
[package]
name = "mlua-luau-scheduler"
version = "0.0.2"
edition = "2021"
license = "MPL-2.0"
repository = "https://github.com/lune-org/lune"
description = "Luau-based async scheduler, using mlua and async-executor"
readme = "README.md"
keywords = ["async", "luau", "scheduler"]
categories = ["async"]

[lib]
path = "src/lib.rs"

[lints]
workspace = true

[dependencies]
async-executor = "1.8"
blocking = "1.5"
concurrent-queue = "2.4"
derive_more = "0.99"
event-listener = "4.0"
futures-lite = "2.2"
rustc-hash = "1.1"
tracing = "0.1"

mlua = { version = "0.9.6", features = [
"luau",
"luau-jit",
"async",
"serialize",
] }

[dev-dependencies]
async-fs = "2.1"
async-io = "2.3"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tracing-tracy = "0.11"

[[example]]
name = "basic_sleep"
test = true

[[example]]
name = "basic_spawn"
test = true

[[example]]
name = "callbacks"
test = true

[[example]]
name = "exit_code"
test = true

[[example]]
name = "lots_of_threads"
test = true

[[example]]
name = "scheduler_ordering"
test = true

[[example]]
name = "tracy"
test = false
Loading

0 comments on commit 2a85532

Please sign in to comment.