Skip to content

Releases: GrayJack/janetrs

JanetRS v0.7.0

15 Mar 15:49
Compare
Choose a tag to compare

Changes

  • BREAKING: Refactor: Rename JanetArgs::get_unwraped to JanetArgs::get_unwrapped
  • BREAKING: Refactor: Rename FileFlags::is_serializeble to FileFlags::is_serializable
  • Feat: Add JanetAbstract::take method
  • Feat: Add JanetAbstract::into_inner method
  • Feat: Add JanetTuple::{sourcemap, set_sourcemap} methods
  • Refactor: Simplify JanetAbstract::new
  • Fix: Fix undefined behavior in JanetArray::as_{ref,mut} methods
  • Fix: Fix clippy lints
  • docs: Update a few documentation comments

JanetRS v0.6.0

10 Sep 22:39
Compare
Choose a tag to compare

Changes

  • BREAKING: Feat: Conditionally expose JanetFile "piped" flag (PIPED was removed in Janet 1.22.0)
  • BREAKING: Refactor: Changed definition of IsJanetAbstract trait
  • BREAKING: Refactor: Changed the return type of JanetAbstract::get{_mut, _unchecked, _unchecked_mut}
  • BREAKING: Feat: Move everything possible to C-unwind
  • BREAKING: Up Minimum Rust version to 1.71.0
  • Feat: Add additional implementation of From implementation for
    JanetBuffer, JanetArray and JanetTable
  • Feat: Expose JanetBuffer methods that use CStr on no_std environment
  • Feat: Expose JanetFile "update" flag
  • Feat: Expose more of the String-like types API on no_std environment
  • Feat: Add method can_resume for JanetFiber
  • Refactor: Simplify the tuple! and structs! macros
  • Refactor: Simplify a few PartialEq implementations
  • Refactor: Simplify JanetStruct implementation of Clone
  • Refactor: Adapt lifetimes to changes on bstr crate
  • Refactor: Modernize format strings
  • Fix: Fix compilation when unicode feature os off
  • Fix: Fix check_mut_ref on janet_fn attribute macro
  • Fix: Fix linking on non x86_64 targets
  • Docs: Improve documentation flags
  • Docs: Simplify links
  • CI: Many CI improvements

JanetRS v0.5.0

05 Dec 01:35
Compare
Choose a tag to compare

Changes

  • BREAKING: Rename JanetClient::with_default_env ->
    JanetClient::load_env_default
  • BREAKING: Rename JanetClient::with_replacements ->
    JanetClient::load_env_replacements
  • Add catch arg to janet_fn attribute macro that adds code to catch Rust
    panics and transform them into Janet panics
  • Add two new functions to initialize JanetClient:
    JanetClient::init_with_replacements and JanetClient::init_with_default_env
  • Add JanetFile::temp
  • Fix tuple::{IntoIter, Iter}::size_hint implementation
  • Migrate to Rust 2021

v0.4.1

07 Sep 23:58
fe7014d
Compare
Choose a tag to compare

Changes

  • Add the trait JanetArgs that extend functionality of [Janet] used in Rust
    defined Janet functions
  • Add the trait JanetTypeName that defines the name of the types displayed
    janet messages
  • Add bad_slot! macro to shorten and help developing Rust defined Janet
    functions

v0.4.0

31 Aug 23:10
78a3d64
Compare
Choose a tag to compare

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

0.3.2

10 Jun 09:10
4b7b012
Compare
Choose a tag to compare

Changes

  • Add JanetTable::clear in Janet version below 1.10.1

0.3.1

02 Jun 04:11
c9ce49c
Compare
Choose a tag to compare

Fixes

  • Fix compiler complaining about alloc crate when std feature is active while using a macro

0.3.0

02 Jun 03:11
d3aac31
Compare
Choose a tag to compare

Changes

  • BREAKING: Rename as_ptr_mut to as_mut_ptr
  • BREAKING: Rename as_raw_mut to as_mut_raw
  • BREAKING: JanetAbstract::new now takes a value
  • BREAKING: Make the janetrs::types module private and export everything inside it in the upper module
  • BREAKING: Modify From<&str> for Janet to return a Janet keyword if &str starts with :
  • BREAKING: Modify CallError::stacktrace function.
  • Add ability to change some Janet behavior using the amalgation feature using environment variables
  • Add DeepEq trait
  • Add dedup, dedup_by and dedup_by_key for JanetArray
  • Add get_unchecked and get_unchecked_mut for JanetArray
  • Add get_unchecked for JanetTuple
  • Add get_method and has_method to Janet
  • Add prototype, set_prototype and with_prototype methods for JanetTable
  • Add get_key_value_proto{_mut} and get_proto{_mut} methods for JanetTable
  • Add JanetGc and JanetGcLockGuard types to access some Janet GC operations
  • Add JanetGcRootGuard and the functions JanetGc::root and JanetGc::unroot to root a Janet object to the GC
  • Add functions to get reference to a JanetAbstract data safely
  • Add JanetAbstract::is
  • Add Janet::int64
  • Add Janet::uint64
  • Create janetrs_version crate to use as common code used by janet_version macro and janetrs::util module
  • Implement DeepEq for most types
  • Implement Debug and Display for JanetSymbol
  • Implement Debug and Display for JanetKeyword
  • Implement IsJanetAbstract for i64 and u64
  • Implement PartialEq, Eq, PartialOrd and Ord for JanetAbstract
  • Implement PartialEq, Eq, PartialOrd and Ord for JanetFunction
  • Implement PartialOrd and Ord for JanetFiber
  • Implement From and TryFrom between i64 and Janet
  • Implement From and TryFrom between u64 and Janet
  • Include "@" before the debug representation of Janet mutable types
  • Refactor Debug implementation of Janet type
  • Refactor Display implementation of Janet type
  • Refactor some implementations of From and TryFrom related to Janet type
  • Reduce code duplication in JanetAbstract functions

Fixes

  • BREAKING: Change definition of IsJanetAbstract trait
  • Expose jcatch! macro only if Janet version supports the underlying mechanism
  • Fix some clippy lints
  • Fix compilation on no_std environment.
  • Make some functions const if using a recent enough Rust version

0.2.0

22 Feb 18:30
c8d279c
Compare
Choose a tag to compare

Changes

  • BREAKING: Add Janet::unwrap that return TaggedJanet
  • BREAKING: Rename Janet::unwrap to Janet::try_unwrap
  • Add JanetEnvironment type
  • Add janet_version/cjvg attribute macros for conditional compilation of Janet versions
  • Add split iterator for JanetBuffer and JanetString
  • Add jcatch declarative macro
  • Refactor JanetClient in terms of JanetEnvironment
  • Implement TaggetJanet type
  • Implement JanetAbstract type
  • Implement JanetPointer type
  • Implement JanetTryState for Janet "exception" recovery
  • Implement PartialEq, Eq, PartialOrd and Ord for several Janet types
  • janet_fn now can accept a parameter check_mut_ref that checks if the function received more than one *mut pointer as parameter (not the default because Janet types are like interior mutability types)
  • More methods added for several types and improvements to the docs

Bug Fixes

  • Fix change in behavior in JanetBuffer since Janet 1.13.0 and also enforce that on earlier versions

v0.1.2

06 Sep 04:32
Compare
Choose a tag to compare

Changes

  • Implement Display for JanetType

Bug Fixes

  • Fix From<char> for JanetString not considering that char can be represented with more than 1 byte in UTF-8