Skip to content

Commit 69011a8

Browse files
committed
Revert "Add initial pluto support"
This reverts commit 0ed11e4.
1 parent 0ed11e4 commit 69011a8

File tree

18 files changed

+102
-251
lines changed

18 files changed

+102
-251
lines changed

.github/workflows/main.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
matrix:
1010
os: [ubuntu-latest, macos-latest, windows-latest]
1111
rust: [stable]
12-
lua: [lua54, lua53, lua52, lua51, luajit, luau, luau-jit, luau-vector4, pluto]
12+
lua: [lua54, lua53, lua52, lua51, luajit, luau, luau-jit, luau-vector4]
1313
include:
1414
- os: ubuntu-latest
1515
target: x86_64-unknown-linux-gnu
@@ -105,7 +105,7 @@ jobs:
105105
matrix:
106106
os: [ubuntu-latest, macos-latest, windows-latest]
107107
rust: [stable, nightly]
108-
lua: [lua54, lua53, lua52, lua51, luajit, luajit52, luau, luau-jit, luau-vector4, pluto]
108+
lua: [lua54, lua53, lua52, lua51, luajit, luajit52, luau, luau-jit, luau-vector4]
109109
include:
110110
- os: ubuntu-latest
111111
target: x86_64-unknown-linux-gnu
@@ -141,7 +141,7 @@ jobs:
141141
matrix:
142142
os: [ubuntu-latest]
143143
rust: [nightly]
144-
lua: [lua54, lua53, lua52, lua51, luajit, luau, luau-jit, luau-vector4, pluto]
144+
lua: [lua54, lua53, lua52, lua51, luajit, luau, luau-jit, luau-vector4]
145145
include:
146146
- os: ubuntu-latest
147147
target: x86_64-unknown-linux-gnu
@@ -168,7 +168,7 @@ jobs:
168168
matrix:
169169
os: [ubuntu-latest]
170170
rust: [nightly]
171-
lua: [lua54, lua53, lua52, lua51, luajit, luau, luau-jit, luau-vector4, pluto]
171+
lua: [lua54, lua53, lua52, lua51, luajit, luau, luau-jit, luau-vector4]
172172
include:
173173
- os: ubuntu-latest
174174
target: x86_64-unknown-linux-gnu
@@ -271,7 +271,7 @@ jobs:
271271
runs-on: ubuntu-latest
272272
strategy:
273273
matrix:
274-
lua: [lua54, lua53, lua52, lua51, luajit, luau, luau-jit, luau-vector4, pluto]
274+
lua: [lua54, lua53, lua52, lua51, luajit, luau, luau-jit, luau-vector4]
275275
steps:
276276
- uses: actions/checkout@main
277277
- uses: dtolnay/rust-toolchain@stable

Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ luajit52 = ["luajit", "ffi/luajit52"]
3535
luau = ["ffi/luau", "dep:libloading"]
3636
luau-jit = ["luau", "ffi/luau-codegen"]
3737
luau-vector4 = ["luau", "ffi/luau-vector4"]
38-
pluto = ["lua54", "ffi/pluto"]
3938
vendored = ["ffi/vendored"]
4039
module = ["dep:mlua_derive", "ffi/module"]
4140
async = ["dep:futures-util"]

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ Below is a list of the available feature flags. By default `mlua` does not enabl
5151
* `luau`: enable [Luau] support (auto vendored mode)
5252
* `luau-jit`: enable [Luau] support with JIT backend.
5353
* `luau-vector4`: enable [Luau] support with 4-dimensional vector.
54-
* `pluto`: enable [Pluto] support (Lua 5.4 dialect, auto vendored mode)
5554
* `vendored`: build static Lua(JIT) library from sources during `mlua` compilation using [lua-src] or [luajit-src] crates
5655
* `module`: enable module mode (building loadable `cdylib` library for Lua)
5756
* `async`: enable async/await support (any executor can be used, eg. [tokio] or [async-std])
@@ -68,7 +67,6 @@ Below is a list of the available feature flags. By default `mlua` does not enabl
6867
[5.1]: https://www.lua.org/manual/5.1/manual.html
6968
[LuaJIT]: https://luajit.org/
7069
[Luau]: https://github.com/luau-lang/luau
71-
[Pluto]: https://github.com/PlutoLang/Pluto
7270
[lua-src]: https://github.com/khvzak/lua-src-rs
7371
[luajit-src]: https://github.com/khvzak/luajit-src-rs
7472
[tokio]: https://github.com/tokio-rs/tokio

mlua-sys/Cargo.toml

+2-4
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@ lua52 = []
2626
lua51 = []
2727
luajit = []
2828
luajit52 = ["luajit"]
29-
luau = ["dep:luau0-src"]
29+
luau = ["luau0-src"]
3030
luau-codegen = ["luau"]
3131
luau-vector4 = ["luau"]
32-
pluto = ["lua54", "dep:pluto-src"]
33-
vendored = ["dep:lua-src", "dep:luajit-src"]
32+
vendored = ["lua-src", "luajit-src"]
3433
module = []
3534

3635
[dependencies]
@@ -42,7 +41,6 @@ pkg-config = "0.3.17"
4241
lua-src = { version = ">= 547.0.0, < 547.1.0", optional = true }
4342
luajit-src = { version = ">= 210.5.0, < 210.6.0", optional = true }
4443
luau0-src = { version = "0.12.0", optional = true }
45-
pluto-src = { version = "0.1.1", optional = true }
4644

4745
[lints.rust]
4846
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(raw_dylib)'] }

mlua-sys/build/find_vendored.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![allow(dead_code)]
22

33
pub fn probe_lua() {
4-
#[cfg(all(feature = "lua54", not(feature = "pluto")))]
4+
#[cfg(feature = "lua54")]
55
let artifacts = lua_src::Build::new().build(lua_src::Lua54);
66

77
#[cfg(feature = "lua53")]
@@ -25,8 +25,5 @@ pub fn probe_lua() {
2525
.set_vector_size(if cfg!(feature = "luau-vector4") { 4 } else { 3 })
2626
.build();
2727

28-
#[cfg(feature = "pluto")]
29-
let artifacts = pluto_src::Build::new().use_longjmp(true).build();
30-
3128
artifacts.print_cargo_metadata();
3229
}

mlua-sys/build/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cfg_if::cfg_if! {
1313
include!("main_inner.rs");
1414
} else {
1515
fn main() {
16-
compile_error!("You can enable only one of the features: lua54, lua53, lua52, lua51, luajit, luajit52, luau, pluto");
16+
compile_error!("You can enable only one of the features: lua54, lua53, lua52, lua51, luajit, luajit52, luau");
1717
}
1818
}
1919
}

mlua-sys/build/main_inner.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::env;
22

33
cfg_if::cfg_if! {
4-
if #[cfg(any(feature = "luau", feature = "pluto", feature = "vendored"))] {
4+
if #[cfg(any(feature = "luau", feature = "vendored"))] {
55
#[path = "find_vendored.rs"]
66
mod find;
77
} else {

mlua-sys/src/lua51/lualib.rs

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
//! Contains definitions from `lualib.h`.
22
3-
use std::os::raw::{c_char, c_int};
3+
use std::os::raw::c_int;
44

55
use super::lua::lua_State;
66

7-
pub const LUA_COLIBNAME: *const c_char = cstr!("coroutine");
8-
pub const LUA_TABLIBNAME: *const c_char = cstr!("table");
9-
pub const LUA_IOLIBNAME: *const c_char = cstr!("io");
10-
pub const LUA_OSLIBNAME: *const c_char = cstr!("os");
11-
pub const LUA_STRLIBNAME: *const c_char = cstr!("string");
12-
pub const LUA_MATHLIBNAME: *const c_char = cstr!("math");
13-
pub const LUA_DBLIBNAME: *const c_char = cstr!("debug");
14-
pub const LUA_LOADLIBNAME: *const c_char = cstr!("package");
7+
pub const LUA_COLIBNAME: &str = "coroutine";
8+
pub const LUA_TABLIBNAME: &str = "table";
9+
pub const LUA_IOLIBNAME: &str = "io";
10+
pub const LUA_OSLIBNAME: &str = "os";
11+
pub const LUA_STRLIBNAME: &str = "string";
12+
pub const LUA_MATHLIBNAME: &str = "math";
13+
pub const LUA_DBLIBNAME: &str = "debug";
14+
pub const LUA_LOADLIBNAME: &str = "package";
1515

1616
#[cfg(feature = "luajit")]
17-
pub const LUA_BITLIBNAME: *const c_char = cstr!("bit");
17+
pub const LUA_BITLIBNAME: &str = "bit";
1818
#[cfg(feature = "luajit")]
19-
pub const LUA_JITLIBNAME: *const c_char = cstr!("jit");
19+
pub const LUA_JITLIBNAME: &str = "jit";
2020
#[cfg(feature = "luajit")]
21-
pub const LUA_FFILIBNAME: *const c_char = cstr!("ffi");
21+
pub const LUA_FFILIBNAME: &str = "ffi";
2222

2323
#[cfg_attr(all(windows, raw_dylib), link(name = "lua51", kind = "raw-dylib"))]
2424
extern "C-unwind" {

mlua-sys/src/lua52/lualib.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
//! Contains definitions from `lualib.h`.
22
3-
use std::os::raw::{c_char, c_int};
3+
use std::os::raw::c_int;
44

55
use super::lua::lua_State;
66

7-
pub const LUA_COLIBNAME: *const c_char = cstr!("coroutine");
8-
pub const LUA_TABLIBNAME: *const c_char = cstr!("table");
9-
pub const LUA_IOLIBNAME: *const c_char = cstr!("io");
10-
pub const LUA_OSLIBNAME: *const c_char = cstr!("os");
11-
pub const LUA_STRLIBNAME: *const c_char = cstr!("string");
12-
pub const LUA_BITLIBNAME: *const c_char = cstr!("bit32");
13-
pub const LUA_MATHLIBNAME: *const c_char = cstr!("math");
14-
pub const LUA_DBLIBNAME: *const c_char = cstr!("debug");
15-
pub const LUA_LOADLIBNAME: *const c_char = cstr!("package");
7+
pub const LUA_COLIBNAME: &str = "coroutine";
8+
pub const LUA_TABLIBNAME: &str = "table";
9+
pub const LUA_IOLIBNAME: &str = "io";
10+
pub const LUA_OSLIBNAME: &str = "os";
11+
pub const LUA_STRLIBNAME: &str = "string";
12+
pub const LUA_BITLIBNAME: &str = "bit32";
13+
pub const LUA_MATHLIBNAME: &str = "math";
14+
pub const LUA_DBLIBNAME: &str = "debug";
15+
pub const LUA_LOADLIBNAME: &str = "package";
1616

1717
#[cfg_attr(all(windows, raw_dylib), link(name = "lua52", kind = "raw-dylib"))]
1818
extern "C-unwind" {

mlua-sys/src/lua53/lauxlib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ use super::lua::{self, lua_CFunction, lua_Integer, lua_Number, lua_State};
99
pub const LUA_ERRFILE: c_int = lua::LUA_ERRERR + 1;
1010

1111
// Key, in the registry, for table of loaded modules
12-
pub const LUA_LOADED_TABLE: *const c_char = cstr!("_LOADED");
12+
pub const LUA_LOADED_TABLE: &str = "_LOADED";
1313

1414
// Key, in the registry, for table of preloaded loaders
15-
pub const LUA_PRELOAD_TABLE: *const c_char = cstr!("_PRELOAD");
15+
pub const LUA_PRELOAD_TABLE: &str = "_PRELOAD";
1616

1717
#[repr(C)]
1818
pub struct luaL_Reg {

mlua-sys/src/lua53/lualib.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
//! Contains definitions from `lualib.h`.
22
3-
use std::os::raw::{c_char, c_int};
3+
use std::os::raw::c_int;
44

55
use super::lua::lua_State;
66

7-
pub const LUA_COLIBNAME: *const c_char = cstr!("coroutine");
8-
pub const LUA_TABLIBNAME: *const c_char = cstr!("table");
9-
pub const LUA_IOLIBNAME: *const c_char = cstr!("io");
10-
pub const LUA_OSLIBNAME: *const c_char = cstr!("os");
11-
pub const LUA_STRLIBNAME: *const c_char = cstr!("string");
12-
pub const LUA_UTF8LIBNAME: *const c_char = cstr!("utf8");
13-
pub const LUA_BITLIBNAME: *const c_char = cstr!("bit32");
14-
pub const LUA_MATHLIBNAME: *const c_char = cstr!("math");
15-
pub const LUA_DBLIBNAME: *const c_char = cstr!("debug");
16-
pub const LUA_LOADLIBNAME: *const c_char = cstr!("package");
7+
pub const LUA_COLIBNAME: &str = "coroutine";
8+
pub const LUA_TABLIBNAME: &str = "table";
9+
pub const LUA_IOLIBNAME: &str = "io";
10+
pub const LUA_OSLIBNAME: &str = "os";
11+
pub const LUA_STRLIBNAME: &str = "string";
12+
pub const LUA_UTF8LIBNAME: &str = "utf8";
13+
pub const LUA_BITLIBNAME: &str = "bit32";
14+
pub const LUA_MATHLIBNAME: &str = "math";
15+
pub const LUA_DBLIBNAME: &str = "debug";
16+
pub const LUA_LOADLIBNAME: &str = "package";
1717

1818
#[cfg_attr(all(windows, raw_dylib), link(name = "lua53", kind = "raw-dylib"))]
1919
extern "C-unwind" {

mlua-sys/src/lua54/lauxlib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ use super::lua::{self, lua_CFunction, lua_Integer, lua_Number, lua_State};
99
pub const LUA_ERRFILE: c_int = lua::LUA_ERRERR + 1;
1010

1111
// Key, in the registry, for table of loaded modules
12-
pub const LUA_LOADED_TABLE: *const c_char = cstr!("_LOADED");
12+
pub const LUA_LOADED_TABLE: &str = "_LOADED";
1313

1414
// Key, in the registry, for table of preloaded loaders
15-
pub const LUA_PRELOAD_TABLE: *const c_char = cstr!("_PRELOAD");
15+
pub const LUA_PRELOAD_TABLE: &str = "_PRELOAD";
1616

1717
#[repr(C)]
1818
pub struct luaL_Reg {

mlua-sys/src/lua54/lualib.rs

+10-30
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
//! Contains definitions from `lualib.h`.
22
3-
use std::os::raw::{c_char, c_int};
3+
use std::os::raw::c_int;
44

55
use super::lua::lua_State;
66

7-
pub const LUA_COLIBNAME: *const c_char = cstr!("coroutine");
8-
pub const LUA_TABLIBNAME: *const c_char = cstr!("table");
9-
pub const LUA_IOLIBNAME: *const c_char = cstr!("io");
10-
pub const LUA_OSLIBNAME: *const c_char = cstr!("os");
11-
pub const LUA_STRLIBNAME: *const c_char = cstr!("string");
12-
pub const LUA_UTF8LIBNAME: *const c_char = cstr!("utf8");
13-
pub const LUA_MATHLIBNAME: *const c_char = cstr!("math");
14-
pub const LUA_DBLIBNAME: *const c_char = cstr!("debug");
15-
pub const LUA_LOADLIBNAME: *const c_char = cstr!("package");
7+
pub const LUA_COLIBNAME: &str = "coroutine";
8+
pub const LUA_TABLIBNAME: &str = "table";
9+
pub const LUA_IOLIBNAME: &str = "io";
10+
pub const LUA_OSLIBNAME: &str = "os";
11+
pub const LUA_STRLIBNAME: &str = "string";
12+
pub const LUA_UTF8LIBNAME: &str = "utf8";
13+
pub const LUA_MATHLIBNAME: &str = "math";
14+
pub const LUA_DBLIBNAME: &str = "debug";
15+
pub const LUA_LOADLIBNAME: &str = "package";
1616

1717
#[cfg_attr(all(windows, raw_dylib), link(name = "lua54", kind = "raw-dylib"))]
1818
extern "C-unwind" {
@@ -30,23 +30,3 @@ extern "C-unwind" {
3030
// open all builtin libraries
3131
pub fn luaL_openlibs(L: *mut lua_State);
3232
}
33-
34-
#[cfg(feature = "pluto")]
35-
extern "C-unwind" {
36-
pub fn luaopen_assert(L: *mut lua_State) -> c_int;
37-
pub fn luaopen_base32(L: *mut lua_State) -> c_int;
38-
pub fn luaopen_base64(L: *mut lua_State) -> c_int;
39-
pub fn luaopen_bigint(L: *mut lua_State) -> c_int;
40-
pub fn luaopen_cat(L: *mut lua_State) -> c_int;
41-
pub fn luaopen_canvas(L: *mut lua_State) -> c_int;
42-
pub fn luaopen_crypto(L: *mut lua_State) -> c_int;
43-
pub fn luaopen_ffi(L: *mut lua_State) -> c_int;
44-
pub fn luaopen_http(L: *mut lua_State) -> c_int;
45-
pub fn luaopen_json(L: *mut lua_State) -> c_int;
46-
pub fn luaopen_regex(L: *mut lua_State) -> c_int;
47-
pub fn luaopen_scheduler(L: *mut lua_State) -> c_int;
48-
pub fn luaopen_socket(L: *mut lua_State) -> c_int;
49-
pub fn luaopen_url(L: *mut lua_State) -> c_int;
50-
pub fn luaopen_vector3(L: *mut lua_State) -> c_int;
51-
pub fn luaopen_xml(L: *mut lua_State) -> c_int;
52-
}

mlua-sys/src/luau/lualib.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
//! Contains definitions from `lualib.h`.
22
3-
use std::os::raw::{c_char, c_int};
3+
use std::os::raw::c_int;
44

55
use super::lua::lua_State;
66

7-
pub const LUA_COLIBNAME: *const c_char = cstr!("coroutine");
8-
pub const LUA_TABLIBNAME: *const c_char = cstr!("table");
9-
pub const LUA_OSLIBNAME: *const c_char = cstr!("os");
10-
pub const LUA_STRLIBNAME: *const c_char = cstr!("string");
11-
pub const LUA_BITLIBNAME: *const c_char = cstr!("bit32");
12-
pub const LUA_BUFFERLIBNAME: *const c_char = cstr!("buffer");
13-
pub const LUA_UTF8LIBNAME: *const c_char = cstr!("utf8");
14-
pub const LUA_MATHLIBNAME: *const c_char = cstr!("math");
15-
pub const LUA_DBLIBNAME: *const c_char = cstr!("debug");
16-
pub const LUA_VECLIBNAME: *const c_char = cstr!("vector");
7+
pub const LUA_COLIBNAME: &str = "coroutine";
8+
pub const LUA_TABLIBNAME: &str = "table";
9+
pub const LUA_OSLIBNAME: &str = "os";
10+
pub const LUA_STRLIBNAME: &str = "string";
11+
pub const LUA_BITLIBNAME: &str = "bit32";
12+
pub const LUA_BUFFERLIBNAME: &str = "buffer";
13+
pub const LUA_UTF8LIBNAME: &str = "utf8";
14+
pub const LUA_MATHLIBNAME: &str = "math";
15+
pub const LUA_DBLIBNAME: &str = "debug";
16+
pub const LUA_VECLIBNAME: &str = "vector";
1717

1818
extern "C-unwind" {
1919
pub fn luaopen_base(L: *mut lua_State) -> c_int;

0 commit comments

Comments
 (0)