Skip to content

v0.4.0

Compare
Choose a tag to compare
@GrayJack GrayJack released this 31 Aug 23:10
· 169 commits to dev since this release
78a3d64

Changes

  • BREAKING: Make JanetGc::collect an unsafe function
  • BREAKING: Remove JanetEnvironment::add_def_with_doc,
    JanetEnvironment::add_var_with_doc, JanetEnvironment::add_c_func_with_doc
    and JanetClient functions with the same names
  • BREAKING: Remove util::def, util::var, util::c_func
  • BREAKING: Rename JanetEnviornment::add_c_func to
    JanetEnvironment::add_c_fn JanetEnvironment::add_c_fn
  • Add JanetFile type
  • Add JanetRng type
  • Add JanetTable::try_insert and related error type
  • Add DefOptions, VarOptions, CFunOptions to interact with the Janet
    environment
  • Add declare_janet_mod macro to generate the machinery that Janet requires do
    create a Janet native module
    • It satisfies the same purpose as janet_mod, but it can get the
      documentation string from the function doc-comments and, for Janet versions
      above 1.17.0, it also add source map information for Janet
  • Add janet_abstract::register function to register an abstract type.
  • Add option to janet_fn attribute macro to include arity checks
  • Add Janet::unwrap_or, Janet::unwrap_or_else and Janet::unwrap_or_default
  • Implement Display for TaggedJanet and defer the Janet display
    implementation to that
  • Refactor the janet_fn attribute macro parameter parsing
  • Refactor the JanetEnvironment and JanetClient API
  • janet_fn now emits code with the function documentation and source map
    information as constants to be used by another macro declare_janet_mod

FIxes

  • Improve error report of attribute macros
  • Fix compilation when no_std and with unicode feature enabled