Janet 1.0.0
First non-alpha release of Janet. This introduces a number of changes to the language, including
the propagate
function, an improved meson build, a better parser API, a better os/execute
API, the ability to marshal and unmarshal PEGs, and more.
Changelog
- Add
with
macro for resource handling. - Add
propagate
function so we can "rethrow" signals after they are
intercepted. This makes signals even more flexible. - Add
JANET_NO_DOCSTRINGS
andJANET_NO_SOURCEMAPS
defines in janetconf.h
for shrinking binary size.
This seems to save about 50kB in most builds, so it's not usually worth it. - Update module system to allow relative imports. The
:cur:
pattern
inmodule/expand-path
will expand to the directory part of the current file, or
whatever the value of(dyn :current-file)
is. The:dir:
pattern gets
the directory part of the input path name. - Remove
:native:
pattern inmodule/paths
. - Add
module/expand-path
- Remove
module/*syspath*
andmodule/*headerpath*
in favor of dynamic
bindings:syspath
and:headerpath
. - Compiled PEGs can now be marshaled and unmarshaled.
- Change signature to
parser/state
- Add
:until
verb to loop. - Add
:p
flag tofiber/new
. - Add
file/{fdopen,fileno}
functions. - Add
parser/clone
function. - Add optional argument to
parser/where
to set parser byte index. - Add optional
env
argument toall-bindings
andall-dynamics
. - Add scratch memory C API functions for auto-released memory on next gc.
Scratch memory differs from normal GCed memory as it can also be freed normally
for better performance. - Add API compatibility checking for modules. This will let native modules not load
when the host program is not of a compatible version or configuration. - Change signature of
os/execute
to be much more flexible.