Crates.io | mlua-socket |
lib.rs | mlua-socket |
version | |
source | src |
created_at | 2023-10-07 11:36:09.545004+00 |
updated_at | 2025-03-28 15:52:51.708752+00 |
description | A Rust-native implementation of LuaSocket for mlua. |
homepage | https://on-prem.net |
repository | https://gitlab.com/megalithic-llc/mlua-socket.git |
max_upload_size | |
id | 996244 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
A Rust-native implementation of LuaSocket for mlua.
Add to your Rust project using one of MLua's features: [lua51, lua52, lua53, lua54, luajit, luajit52].
$ cargo add mlua-socket --features luajit
$ make check
$ make bench
use mlua::Lua;
let lua = Lua::new();
mlua_socket::preload(&lua);
let script = r#"
local socket = require('socket')
local client = socket.connect('127.0.0.1', 3000)
return client:send('abcd')
"#;
let _last_index: u16 = lua.load(script).eval()?;