Skip to content

Janet 1.0.0

Compare
Choose a tag to compare
@bakpakin bakpakin released this 01 Jul 20:17

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 and JANET_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
    in module/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 in module/paths.
  • Add module/expand-path
  • Remove module/*syspath* and module/*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 to fiber/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 to all-bindings and all-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.