mirror of
https://github.com/lune-org/mlua-luau-scheduler.git
synced 2025-04-07 20:10:56 +01:00
Use stable mlua version
This commit is contained in:
parent
71026f9692
commit
0207da50ae
3 changed files with 14 additions and 6 deletions
6
Cargo.lock
generated
6
Cargo.lock
generated
|
@ -355,7 +355,8 @@ checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mlua"
|
name = "mlua"
|
||||||
version = "0.9.5"
|
version = "0.9.5"
|
||||||
source = "git+https://github.com/mlua-rs/mlua.git?rev=1754226c7440ec6c194d2d678ec083b621d46ceb#1754226c7440ec6c194d2d678ec083b621d46ceb"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1d3561f79659ff3afad7b25e2bf2ec21507fe601ebecb7f81088669ec4bfd51e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bstr",
|
"bstr",
|
||||||
"erased-serde",
|
"erased-serde",
|
||||||
|
@ -391,7 +392,8 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mlua-sys"
|
name = "mlua-sys"
|
||||||
version = "0.5.1"
|
version = "0.5.1"
|
||||||
source = "git+https://github.com/mlua-rs/mlua.git?rev=1754226c7440ec6c194d2d678ec083b621d46ceb#1754226c7440ec6c194d2d678ec083b621d46ceb"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2847b42764435201d8cbee1f517edb79c4cca4181877b90047587c89e1b7bce4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
|
|
|
@ -19,7 +19,7 @@ futures-lite = "2.2"
|
||||||
rustc-hash = "1.1"
|
rustc-hash = "1.1"
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
|
|
||||||
mlua = { git = "https://github.com/mlua-rs/mlua.git", rev = "1754226c7440ec6c194d2d678ec083b621d46ceb", features = [
|
mlua = { version = "0.9.5", features = [
|
||||||
"luau",
|
"luau",
|
||||||
"luau-jit",
|
"luau-jit",
|
||||||
"async",
|
"async",
|
||||||
|
|
|
@ -11,16 +11,22 @@ use mlua::prelude::*;
|
||||||
The actual thread may or may not still exist and be active at any given point in time.
|
The actual thread may or may not still exist and be active at any given point in time.
|
||||||
*/
|
*/
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
pub struct ThreadId(usize);
|
pub struct ThreadId {
|
||||||
|
inner: usize,
|
||||||
|
}
|
||||||
|
|
||||||
impl From<&LuaThread<'_>> for ThreadId {
|
impl From<&LuaThread<'_>> for ThreadId {
|
||||||
fn from(thread: &LuaThread) -> Self {
|
fn from(thread: &LuaThread) -> Self {
|
||||||
Self(thread.to_pointer() as usize)
|
// TODO: Use this to avoid clone when mlua releases a new version with it
|
||||||
|
// Self { inner: thread.to_pointer() as usize }
|
||||||
|
Self {
|
||||||
|
inner: LuaValue::Thread(thread.clone()).to_pointer() as usize,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Hash for ThreadId {
|
impl Hash for ThreadId {
|
||||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||||
self.0.hash(state);
|
self.inner.hash(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue