Skip to content

Commit f26c11d

Browse files
authored
Merge pull request #240 from amethyst/release_prep_20220126
Release prep 20220126.
2 parents e9d9a35 + e7e5cd7 commit f26c11d

File tree

4 files changed

+47
-18
lines changed

4 files changed

+47
-18
lines changed

CHANGELOG.md

+24
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
## [0.19.0]
2+
- The Lua C library build now uses separate -sys crates, and bindgen rather than
3+
hand-maintained declarations. (Thanks @pollend!) The "builtin-lua51" feature
4+
is now available.
5+
- Value::Integer is now no longer available when building for Lua 5.1. (In Lua 5.1
6+
there is no integer type).
7+
- Add `Function::dump()` which produces the compiled version of a function (like
8+
the `string.dump` Lua function or `lua_dump()` C API).
9+
- Add unsafe `Chunk::into_function_allow_binary()`. This allows loading a compiled
10+
binary generated from `Function::dump()`.
11+
- Add `Initflags` to control some settings done when `Lua` is initialised. They
12+
can be specified with the new unsafe `Lua::unsafe_new_with_flags()` constructor.
13+
The flags available (all set by default with the other constructors):
14+
* PCALL_WRAPPERS:
15+
- wrap pcall and xpcall so that they don't allow catching Rust panics
16+
* LOAD_WRAPPERS:
17+
- wrap functions load, loadfile, dofile (and loadstring for lua 5.1) to prevent
18+
loading compiled/bytecode modules.
19+
* REMOVE_LOADLIB:
20+
- Remove `package.loadlib` and the module finding functions which allow loading
21+
compiled C libraries.
22+
- `String<'lua>` now implements `Eq` and `Hash` (can be useful for local collections
23+
within a context callback).
24+
125
## [0.18.0]
226
- Add support for multiple Lua versions, including 5.1, 5.3 and 5.4 (the default)
327
- Add implementations of `FromLua` and `ToLua` for `[T;N]`.

Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rlua"
3-
version = "0.18.1-pre0"
3+
version = "0.19.0"
44
authors = ["kyren <[email protected]>"]
55
edition = "2018"
66
description = "High level bindings to Lua 5.x"
@@ -32,9 +32,9 @@ libc = { version = "0.2" }
3232
num-traits = { version = "0.2.14" }
3333
bitflags = { version = "1.0.4" }
3434
bstr = {version = "0.2", features = ["std"], default_features = false }
35-
rlua-lua54-sys = { path = "./crates/rlua-lua54-sys", optional = true }
36-
rlua-lua53-sys = { path = "./crates/rlua-lua53-sys", optional = true }
37-
rlua-lua51-sys = { path = "./crates/rlua-lua51-sys", optional = true }
35+
rlua-lua54-sys = { version = "0.1.0", optional = true }
36+
rlua-lua53-sys = { version = "0.1.0", optional = true }
37+
rlua-lua51-sys = { version = "0.1.0", optional = true }
3838

3939

4040
[dev-dependencies]

README.md

+18-14
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ something you feel could perform better, feel free to file a bug report.
2424
Currently, this library follows a pre-1.0 semver, so all API changes should be
2525
accompanied by 0.x version bumps. See the [Version 1.0
2626
milestone](https://github.com/amethyst/rlua/milestone/1) for the work planned
27-
to be done before a more stable 1.0 release.
27+
to be done before a more stable 1.0 release. There may be breaking changes as
28+
these issues are dealt with on the way (the version number will be bumped as
29+
needed).
2830

2931
## Lua versions supported
3032

@@ -41,27 +43,29 @@ The available features are:
4143

4244
| Cargo feature | Lua version |
4345
| ------------- | ----------- |
44-
| builtin-lua54 | Lua 5.4 (source included in crate, default) |
45-
| builtin-lua53 | Lua 5.3 (source included in crate) |
46-
| system-lua51 | Lua 5.1 (installed on host system, found using pkg-config) |
47-
| system-lua53 | Lua 5.3 (installed on host system, found using pkg-config) |
46+
| builtin-lua54 | Lua 5.4 (source included in package, default) |
47+
| builtin-lua53 | Lua 5.3 (source included in package) |
48+
| builtin-lua51 | Lua 5.1 (source included in package) |
4849
| system-lua54 | Lua 5.4 (installed on host system, found using pkg-config) |
50+
| system-lua53 | Lua 5.3 (installed on host system, found using pkg-config) |
51+
| system-lua51 | Lua 5.1 (installed on host system, found using pkg-config) |
4952

5053
At current writing rlua has not been tested with alternative Lua
5154
implementations (such as Luajit) which share PUC-Rio Lua's C API, but it is
52-
expected that they can be made to work with little if any change to rlua.
55+
expected that they can be made to work with little if any change to rlua, and
56+
support would be welcome.
5357

5458
## Safety and Panics
5559

56-
The goal of this library is complete safety: it should not be possible to cause
57-
undefined behavior with the safe API, even in edge cases. Unsoundness is
58-
considered the most serious kind of bug, so if you find the ability to cause UB
59-
with this API without `unsafe`, please file a bug report.
60+
The goal of this library is complete safety by default: it should not be
61+
possible to cause undefined behavior with the safe API, even in edge cases.
62+
Unsoundness is considered the most serious kind of bug, so if you find the
63+
ability to cause UB with this API without `unsafe`, please file a bug report.
6064

61-
*NOTE: There are some Lua stdlib functions which are currently not wrapped or
62-
behind an unsafe boundary and can be used by scripts to cause memory unsafety,
63-
please see [this issue](https://github.com/kyren/rlua/issues/116) for more
64-
details.*
65+
This includes calling functions in the Lua standard library; some unsafe
66+
functions are wrapped by default (for example to prevent loading binary
67+
modules), but these wrappers can be disabled using one of the `unsafe`
68+
constructors for the `Lua` object if required for the application.
6569

6670
Another goal of this library is complete protection from panics: currently, it
6771
should not be possible for a script to trigger a panic. There ARE however

RELEASE.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* Check other fields in Cargo.toml are sensible
99
* Check that CI is passing
1010
* Tag the commit for the release
11+
* Run `cargo publish` on -sys crates if updated.
1112
* Run `cargo publish`
1213
* Check that the version from crates.io looks good
1314
* Update version number on branch to (next version)-alpha.

0 commit comments

Comments
 (0)