0.8.6
Added
-
Added a builtin API for hashing and calculating HMACs as part of the
serde
library (#193)Basic usage:
local serde = require("@lune/serde") local hash = serde.hash("sha256", "a message to hash") local hmac = serde.hmac("sha256", "a message to hash", "a secret string") print(hash) print(hmac)
The returned hashes are sequences of lowercase hexadecimal digits. The following algorithms are supported:
md5
,sha1
,sha224
,sha256
,sha384
,sha512
,sha3-224
,sha3-256
,sha3-384
,sha3-512
,blake3
-
Added two new options to
luau.load
:codegenEnabled
- whether or not codegen should be enabled for the loaded chunk.injectGlobals
- whether or not to inject globals into a passedenvironment
.
By default, globals are injected and codegen is disabled.
Check the documentation for theluau
standard library for more information. -
Implemented support for floor division operator /
__idiv
for theVector2
andVector3
types in theroblox
standard library (#196)
Changed
- Sandboxing and codegen in the Luau VM is now fully enabled, resulting in up to 2x or faster code execution.
This should not result in any behavior differences in Lune, but if it does, please open an issue. - Improved formatting of custom error objects (such as when
fs.readFile
returns an error) when printed or formatted usingstdio.format
.
Fixed
- Fixed
__type
and__tostring
metamethods on userdatas and tables not being respected when printed or formatted usingstdio.format
. - Fixed the
_VERSION
global containing an incorrect Lune version string