Skip to content

Commit 4ce0da4

Browse files
committed
docs: update status
1 parent 8398b38 commit 4ce0da4

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

docs.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,11 @@ In general, just replace the "k" with the word "cont". This is just to make the
8080

8181
Because `error` is a reserved word in Zig, these functions have been renamed to `raiseError` and `raiseErrorAux` respectively.
8282

83-
### `lua_tostring` and `lua_tolstring`
83+
### `string` vs `lstring`
8484

85-
These functions have been combined into `Lua.toString()`. The function `lua_tostring` is a macro around `lua_tolstring` and does not return the length of the string.
85+
The "string" variant functions vs the "lstring" functions only differ by returning the length of the string. In ziglua, the lstring functions are all named "bytes" instead. For example, `lua_tolstring` is `Lua.toBytes`. This is because these functions are typically used in cases when the string _might_ contain zeros before the null-terminating zero.
86+
87+
The "string" variant functions are safe to use when the string is known to be null terminated without inner zeros.
8688

8789
### `lua_pushvfstring`
8890

readme.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ In a nutshell, ziglua is a simple wrapper around the C API you would get by usin
1717
* Compiler-enforced checking of optional pointers
1818
* Functions return `bool` rather than `int` to indicate success
1919

20-
While there are some helper functions added to complement the C API, ziglua aims to remain low-level. If you want something higher-level, perhaps try [zoltan](https://github.com/ranciere/zoltan).
20+
While there are some helper functions added to complement the C API, ziglua aims to remain low-level.
21+
This allows full access to Lua with the added benefits of Zig's improvements over C.
22+
23+
If you want something higher-level, perhaps try [zoltan](https://github.com/ranciere/zoltan).
2124

2225
## Getting Started
2326

@@ -58,13 +61,9 @@ See [docs.md](https://github.com/natecraddock/ziglua/blob/master/docs.md) for do
5861

5962
## Status
6063

61-
All functions, types, and constants in the public Lua API have been wrapped in Zig **(268/268 identifiers)**.
62-
63-
All of the functions have been referenced in tests, so the parameters are correctly typed.
64-
65-
But I am still going through each function to decide the correct return types, errors, parameters, naming, etc.
64+
Nearly all functions, types, and constants in the C API have been wrapped in ziglua. Only a few exceptions have been made when the function doesn't make sense in Zig (like functions using `va_list`).
6665

67-
ziglua should be relatively stable and safe to use now, but is still rapidly changing.
66+
All functions have been type checked, but only the standard C API has been tested fully. ziglua should be relatively stable and safe to use now, but is still new and changing frequently.
6867

6968
## Acknowledgements
7069

0 commit comments

Comments
 (0)