Alex Orlenko
72824a468a
Remove custom PartialEq for LuaString and use derived one
...
Lua can compare strings using `lua_rawequal` and it's more efficient
than always compare bytes.
Under the hood Lua compare pointers for interned strings and content for long ones.
Close #694
2026-04-22 22:30:45 +01:00
Alex Orlenko
2ace892613
Rename string::String to LuaString
2026-01-29 18:45:41 +00:00
Alex Orlenko
e33bcf7938
Add Lua 5.5 external string null byte test
2026-01-22 15:32:14 +00:00
Alex Orlenko
fca38a6637
Imporove BorrowedStr/BorrowedBytes ergonomic.
...
Implement `FromLua` and `IntoLua` for these types to allow working with them directly.
2025-01-30 23:07:02 +00:00
Alex Orlenko
7ce6b97da9
Add String::wrap method to wrap arbitrary AsRef<[u8]>
2024-11-22 11:48:20 +00:00
Alex Orlenko
4891a6ac10
Fix utf-8 test when bstr v1.11 switchted to LowerHex
2024-11-17 18:01:05 +00:00
Alex Orlenko
8c889cc353
Add String::display method
2024-11-09 14:24:43 +00:00
Alex Orlenko
9e16e18132
Update string tests
2024-10-16 15:59:23 +01:00
Alex Orlenko
4dddf3c18d
Use fmt::Debug implementation for Lua string from bstr
2024-09-26 22:46:02 +01:00
Alex Orlenko
94415065c0
Fix Lua String soundness when borrowing &str or &[u8].
...
Make borrowing using new `BorrowedStr` and `BorrowedBytes` types that holds strong reference to Lua.
2024-07-31 13:42:38 +01:00
Alex Orlenko
b4892c228c
Add rustfmt.toml
2024-07-31 13:42:37 +01:00
Alex Orlenko
7221051683
Refactor:
...
- Remove the rest of `'lua` lifetimes
- Remove Owned types
2024-07-31 13:42:35 +01:00
Alex Orlenko
908f37656a
Add to_pointer function to Function/Table/Thread
2024-02-02 09:23:16 +00:00
Alex Orlenko
a1d385c7b7
Add OwnedString
2023-04-26 23:17:27 +01:00
Alex Orlenko
cb3d58b1c7
Better Debug for String
2023-01-04 15:56:57 +00:00
Alex Orlenko
28a063c1e5
Implement Hash for Lua String
2022-04-08 20:02:18 +01:00
Alex Orlenko
b84d1bd65f
Update test names
2021-06-18 23:13:56 +01:00
Alex Orlenko
821f1125b6
Add String::to_string_lossy
2021-06-04 00:16:40 +01:00
Alex Orlenko
e26cec5db9
Drop 'feature(link_args)' (removed from nightly). Don't run tests for LuaJIT 2.0.5
2021-04-16 22:27:28 +01:00
Alex Orlenko
2fd6757f39
Add LuaJIT 2.0.5 stable support
2020-06-06 16:07:16 +01:00
Alex Orlenko
07fc4642ae
Support vendored versions of Lua and LuaJIT
2020-01-25 20:47:31 +00:00
Alex Orlenko
6f42a6cca9
Add LuaJIT support
2019-11-04 22:23:15 +00:00
Alex Orlenko
c4fd7a9faf
Lua 5.1 support
2019-10-17 17:05:42 +01:00
Alex Orlenko
cb109f6e36
Rename to mlua
2019-10-01 16:11:12 +01:00
Alex Orlenko
54f4627195
Update tests (excl. compile-fail)
2019-09-29 13:03:32 +01:00
Alex Orlenko
b23ee6a162
cargo fmt
2019-09-29 12:56:03 +01:00
kyren
65d8ad2f86
Allow non-utf8 Lua source in load / exec / eval
2018-10-01 06:00:21 -04:00
kyren
167184ae76
Allow arbitrary [u8] Lua strings
2018-09-30 15:42:04 -04:00
kyren
b8da08187d
Move integration tests into top-level tests directory
...
other minor refactors
2018-09-16 20:15:51 -04:00