Skip to content

Commit 60b800a

Browse files
committed
add changelog for 0.3
1 parent 8c0b34d commit 60b800a

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

CHANGELOG.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,55 @@
1+
## [0.3]
2+
3+
Huge release! Much safer `Executor` API that no longer requires recursion
4+
from Rust -> Lua -> Rust for Rust callbacks to call Lua functions, eliminating
5+
problems with unrestricted Rust stack usage. The `Executor` API also has a
6+
bunch more weird powers that other implementations of Lua can't have, like "tail
7+
resuming" other coroutines and "tail yield".
8+
9+
There is a new `piccolo-util` crate that adds support for some very common use
10+
cases that are not trivial to do in `piccolo` proper:
11+
12+
* Serde support for convenient conversion between Rust types and Lua tables.
13+
* "Freeze" system to safely support the common case where you need to pass
14+
a non-'static (and non-'gc) value into Lua. Not specific to piccolo, it is
15+
actually a general way of safely erasing a single lifetime parameter from a
16+
type (and replacing it with a runtime check).
17+
* Super quick and simple way to wrap Rust types into a Lua userdata with
18+
methods.
19+
20+
`piccolo-util` will always be an **optional** dependency, and it may contain
21+
code that is more opinionated or limited than vanilla `piccolo` should be.
22+
`piccolo-util` will have opionions about things, and those opinions may be
23+
different than yours... if it is in your way or incomplete for your use, you can
24+
always use it as a starting point for something better.
25+
26+
Also includes a lot of quality of life API improvements, error message
27+
improvements, and more!
28+
29+
- New `Executor` API that enables safe thread recursion and "tail resume" /
30+
"tail yield".
31+
- New `piccolo-util` crate with very commonly requested, useful features that
32+
are too opinionated or limited to belong in `piccolo` proper.
33+
- API changes to `Stack` to support a single, unified thread stack shared
34+
between Lua and callbacks, similar to PUC-Rio Lua et al.
35+
- Upvalues no longer keep entire threads alive and instead use new gc-arena
36+
finalization support to become closed when threads are garbage collected.
37+
- `IntoMultiValue` / `FromMultiValue` conversion for tuples now allows every
38+
element to be multi-converted rather than just the last element.
39+
- Support the `__eq` metamethod.
40+
- Error message improvements in lexer / parser errors (they now have line
41+
numbers at least!).
42+
- API changes to second callback parameter, now an `Execution` type with `Fuel`
43+
access *and* also calling thread information.
44+
- Add "chunk name" information to compiled chunks for future use in runtime
45+
errors / tracebacks.
46+
- Simplified `ctx` access, most methods are now directly implemented on `Context`.
47+
- Lots of type renames for clarity, `AnyCallback` -> `Callback`, `AnyUserData`
48+
-> `UserData`, `AnyValue` -> `Any`, and others.
49+
- Add line number annotations to opcodes for future tracebacks.
50+
- Clean up general ptr handling and allow the user to access internal `Gc`
51+
pointers in all cases, allows for weak pointers to all pointer types.
52+
153
## [0.2]
254
- Allow `Thread` to be forcibly reset to a stopped state.
355
- Improve the `Table` API, add functions that skip `IntoValue` conversion and

0 commit comments

Comments
 (0)