Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 27 Oct 19:04
· 41 commits to ngc since this release

Release 0.3.0

Native library for hosting the SLua runtime: slua_shim for Windows x64 and Linux x64. The package
built from these files carries no managed code; the host binds to the C interface in slua_shim.h.

  • Runtime pin: 8b40c52 (the commit of the SLua tree the libraries are built against)
  • API version: 5 (a host must check slua_api_version() for an exact match)
  • Saved-state stamp format: runtime=<pin> api=<n>; slua_version returns the same text,
    here runtime=8b40c525bf api=5
  • Built from commit: 688da07

Every file was built or copied by one CI run from that commit. SHA256SUMS.txt lists the SHA-256 of
every other file in the release (check with sha256sum -c SHA256SUMS.txt).

File Contents
slua-native-win-x64-0.3.0.zip slua_shim.dll
slua-native-linux-x64-0.3.0.tar.gz libslua_shim.so, built on Ubuntu 22.04
slua_shim.h the C interface
THIRD-PARTY-NOTICES.txt, licenses.zip licences of everything linked into the libraries

What changed since 0.2.0 (API version 4 to 5)

The version check is exact: a host that needs API version 5 refuses a library of another version and names both numbers.

  1. New export slua_set_host_functions (and Host.SetHostFunctions in the test binding). The host gives the LSL compiler the os, iw and bot functions it supplies, one per line in the form of builtins.txt (integer osAddOne( integer n )). LSL compiled with the runtime's compiler can then call them as it calls ll functions. A call to osName, iwName or botName runs the host function registered as ossl.Name, iw.Name or bot.Name, which an SLua script calls by that name. ll and llcompat stay the runtime's own: a line that names an ll function, or any name that is not os, iw or bot followed by a capital letter, is refused and the earlier list stays. A name may be listed several times with different parameter types (the same parameter types twice is refused), each with its own result type; an LSL call picks the signature the way the Phlox compiler does (an exact type beats an implicit conversion, integer to float and key to string and back; a tie is a compile error naming the function and both signatures), and all of them run the one host function, which tells the signatures apart by the arguments it gets.
  2. With a list set, a name that is neither in the list nor an ll function fails to compile with its line number. A host that sets no list gets what API 4 gave: an LSL call to an os, iw or bot function is refused with the text that points at the engine that runs such scripts.
  3. The LSL compiler (Compiler/src/LSLCompiler.cpp) takes the module of a builtin call from its prefix: ll for the runtime's functions, ossl, iw or bot for the host's. Because that changes a file of the parent tree, ngc-host/LL-RUNTIME-PIN now names the commit that carries the change and the stamp's runtime part is that commit. Scripts saved by an earlier release start fresh once (the API part of the stamp changed as well).
  4. A release's change list now comes from a file at the tag, ngc-host/release-notes/<version>.md, and is added to the generated release notes. A version without a dash is refused without the file.