All notable changes to the library should be put here
- Breaking Refactor: Rename
JanetArgs::get_unwrapped
toJanetArgs::try_get
- Breaking Refactor: Rename
JanetArgs::get_panic
toJanetArgs::get_or_panic
- Breaking Refactor: Turn
JanetConversionError
into a enum - Breaking Refactor: Refactor
CFunOptions
to useCStr
instead ofstr
- Breaking Refactor: Use
usize
for length/index/capacity in collections - Breaking Refactor: Make
IsJanetAbstract
an unsafe trait - Breaking Feat: Make
amalgation
feature enabled by default - Breaking Feat: Make
#[janet_fn]
maintain the high-level function in scope - Feat: Add
Janet::dynamic_from_cstr
constructor - Feat: Add
JanetArgs::get_value
andJanetArgs::get_tagged
trait methods - Feat: Add
JanetArgs::get_or_default
trait method - Feat: Add
JanetArgs::get_or_else
trait method - Feat: Add
JanetArgs::get_matches
andJanetArgs::get_tagged_matches
- Feat: Add
JanetArray::pop_if
method - Feat: Add
JanetArray::push_within_capacity
method - Feat: Add
JanetArray::extract_if
method - Feat: Add
JanetArray::split_off
method - Feat: Add
JanetArray::swap_unchecked
method - Feat: Add
JanetArray::retain
andJanetArray::retain_mut
methods - Feat: Add
JanetArray::get_range
,JanetArray::get_range_mut
,JanetArray::get_range_unchecked
and ,JanetArray::get_range_unchecked_mut
methods - Feat: Add
JanetArray::weak
andJanetArray::weak_with_capacity
constructors - Feat: Add
JanetBuffer::push_janet_string
method - Feat: Add
assert_deep_eq!
macro - Feat: Add
assert_deep_ne!
macro - Feat: Add
env::set_dynamic
function - Feat: Implement
JanetArgs
for[Janet; N]
- Feat: Add conversion from
Janet
toisize
andusize
- Feat: Add conversion from
isize
/usize
toJanet
- Feat: Make conversion from
Janet
toi64
andu64
accept when Janet is Number - Feat: Make conversion from
Janet
toi64
,u64
,usize
,isize
accept when Janet is String - Perf: Avoid allocation in
Janet::dynamic
if the passed argument is already null terminated - Refactor: Use default implementation on
JanetArgs
trait for most methods - Refactor: Simplify
jpanic!
macro - Refactor: janetrs_macros 0.7.0 — Update
syn
crate to 2.0 - Refactor: Use
core::error
- Fix: janetrs_macros 0.7.1 — Fix
janet_fn
attribute macro not generating Janet docstring correctly - Fix: janetrs_version — Add missed feature flag
inline-more
- Fix: Fix conversion from
Janet
to 32 bit integers - Fix: Fix bounds checking for
JanetArray::insert
- BREAKING: Refactor: Rename
JanetArgs::get_unwraped
toJanetArgs::get_unwrapped
- BREAKING: Refactor: Rename
FileFlags::is_serializeble
toFileFlags::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
- 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 forJanetBuffer
,JanetArray
andJanetTable
- Feat: Expose
JanetBuffer
methods that useCStr
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
forJanetFiber
- Refactor: Simplify the
tuple!
andstructs!
macros - Refactor: Simplify a few
PartialEq
implementations - Refactor: Simplify
JanetStruct
implementation ofClone
- 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
onjanet_fn
attribute macro - Fix: Fix linking on non x86_64 targets
- Docs: Improve documentation flags
- Docs: Simplify links
- CI: Many CI improvements
- BREAKING: Rename
JanetClient::with_default_env
->JanetClient::load_env_default
- BREAKING: Rename
JanetClient::with_replacements
->JanetClient::load_env_replacements
- Add
catch
arg tojanet_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
andJanetClient::init_with_default_env
- Add
JanetFile::temp
- Fix
tuple::{IntoIter, Iter}::size_hint
implementation - Migrate to Rust 2021
- 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
- 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
andJanetClient
functions with the same names - BREAKING: Remove
util::def
,util::var
,util::c_func
- BREAKING: Rename
JanetEnviornment::add_c_func
toJanetEnvironment::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
- It satisfies the same purpose as
- 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
andJanet::unwrap_or_default
- Implement
Display
forTaggedJanet
and defer theJanet
display implementation to that - Improve error report of attribute macros
- Refactor the
janet_fn
attribute macro parameter parsing - Refactor the
JanetEnvironment
andJanetClient
API janet_fn
now emits code with the function documentation and source map information as constants to be used by another macrodeclare_janet_mod
- Fix compilation when no_std and with unicode feature enabled
- Add
JanetTable::clear
in Janet version below 1.10.1
- Fix compiler complaining about alloc crate when
std
feature is active while using a macro
- BREAKING: Rename
as_ptr_mut
toas_mut_ptr
- BREAKING: Rename
as_raw_mut
toas_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>
forJanet
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
anddedup_by_key
forJanetArray
- Add
get_unchecked
andget_unchecked_mut
forJanetArray
- Add
get_unchecked
forJanetTuple
- Add
get_method
andhas_method
toJanet
- Add
prototype
,set_prototype
andwith_prototype
methods forJanetTable
- Add
get_key_value_proto{_mut}
andget_proto{_mut}
methods forJanetTable
- Add
JanetGc
andJanetGcLockGuard
types to access some Janet GC operations - Add
JanetGcRootGuard
and the functionsJanetGc::root
andJanetGc::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 byjanet_version
macro andjanetrs::util
module - Implement
DeepEq
for most types - Implement
Debug
andDisplay
forJanetSymbol
- Implement
Debug
andDisplay
forJanetKeyword
- Implement
IsJanetAbstract
for i64 and u64 - Implement
PartialEq
,Eq
,PartialOrd
andOrd
forJanetAbstract
- Implement
PartialEq
,Eq
,PartialOrd
andOrd
forJanetFunction
- Implement
PartialOrd
andOrd
forJanetFiber
- Implement
From
andTryFrom
betweeni64
andJanet
- Implement
From
andTryFrom
betweenu64
andJanet
- Include "@" before the debug representation of Janet mutable types
- Refactor
Debug
implementation ofJanet
type - Refactor
Display
implementation ofJanet
type - Refactor some implementations of
From
andTryFrom
related toJanet
type - Reduce code duplication in
JanetAbstract
functions
- 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
- BREAKING: Add
Janet::unwrap
that returnTaggedJanet
- BREAKING: Rename
Janet::unwrap
toJanet::try_unwrap
- Add
JanetEnvironment
type - Add
janet_version
/cjvg
attribute macros for conditional compilation of Janet versions - Add split iterator for
JanetBuffer
andJanetString
- Add
jcatch
declarative macro - Refactor
JanetClient
in terms ofJanetEnvironment
- Implement
TaggetJanet
type - Implement
JanetAbstract
type - Implement
JanetPointer
type - Implement
JanetTryState
for Janet "exception" recovery - Implement
PartialEq
,Eq
,PartialOrd
andOrd
for several Janet types janet_fn
now can accept a parametercheck_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
- Fix change in behavior in
JanetBuffer
since Janet 1.13.0 and also enforce that on earlier versions - Fix UB in
JanetTryState
safe API - Fix
Default
implementation forJanetEnvironment
- Fix
JanetTuple
implementation ofPartialEq
to match the Janet implementation
- Implement Display for
JanetType
- Fix
From<char>
forJanetString
not considering that char can be represented with more than 1 byte in UTF-8
- Basic Janet types manipulation
- A way to run the Janet runtime
- Macros to create Janet collections
- Macro to cause Janet Panics
- Macro to catch Rust Panic and transform to Janet Panic