All notable changes to the library should be put here
- 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