All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
0.19.0 - 2024-03-16
- Upgraded to Rust 2021 edition.
- This also raised the minimum supported Rust version to 1.56.
- Added support for Rust's non-zero integer types.
0.18.0 - 2021-09-26
- Eliminated the build-time dependency on LLVM by putting the raw Rust bindings in source, instead of generating them at build time. This would also make builds faster.
0.17.0 - 2021-03-09
- Added
OnceGlobalRef
, which eases the initialization of static references to long-lived Lisp values.- Added
use_symbols!
, which enables module code to use Lisp symbols without repeatedly interning them. - Added
define_errors!
andEnv::signal
to simplify the process of defining and signaling custom Lisp errors.
- Added
- Raised the minimum supported Rust version to 1.45.
- Added
ResultExt::or_signal
to make it more convenient to convert a Rust error into a Lisp error. - Remove
ResultExt::unwrap_or_propagate
.
0.16.2 - 2021-03-04
- Fixed compilation on
aarch64-apple-darwin
(Apple Silicon).
0.16.0 - 2021-01-31
- Replaced
failure
withanyhow
andthiserror
. Re-exportanyhow
asemacs::error::anyhow
.
0.15.1 - 2021-01-06
- Fixed compilation errors on new versions of
syn
, which removed theexport
module.
0.15.0 - 2020-12-27
- Disabled the workaround for Emacs's GC bug #31238 if possible (i.e. in Emacs 27+, where the bug was fixed). This should speed up module code in newer Emacs versions.
0.14.1 - 2020-10-14
- Fixed proc macro's hygiene issues, for compatibility with Rust 1.47. Example:
emacs-tree-sitter
fails to compile. For details, see Rust's release note and PR that introduced this change.
0.14.0 - 2020-04-18
- Reworked
Vector
, making it iterable. - Changed
Env::vector
to return aValue
. - Added
call_unprotected
variants toValue::call
,Env::call
,GlobalRef::call
, to enable certain optimizations.
0.13.0 - 2020-03-11
- Added
GlobalRef
, which allows keeping Lisp values around without anEnv
. - Reduced indirection when calling common built-in subroutines through
Env
. - Removed
module_init!
,export_functions!
, and their aliases. - Replaced
lazy_static
dependency withonce_cell
. - Fixed memory leaks caused by the workaround for Emacs's GC bug #31238, which caused issue #2.
0.12.3 - 2020-02-18
- Added
Value::car
,Value::cdr
.
0.12.2 - 2020-02-17
- Added
Env::cons
.
0.12.1 - 2020-01-25
- Added
Env::make_user_ptr
,Value::get_user_ptr
,Value::get_user_finalizer
.
0.12.0 - 2019-12-04
- Added
Env::make_vector
andEnv::vector
functions. - Added a default implementation for
Transfer::type_name
. This raised the minimum supported Rust version to 1.38 (forstd::any::type_name()
). - Added function to copy a Lisp string's content to a buffer
Value::copy_string_contents
. - Deprecated
unwrap_or_propagate
, and marked it asunsafe
.
0.11.0 - 2019-08-05
- Made
Env::call
a lot more flexible. Also addedValue::call
. - Added
rust-wrong-type-user-ptr
towrong-type-argument
classification. - Deprecated
module_init!
andexport_functions!
. - Replaced
IntoLisp
implementation forAsRef<str>
with separate implementations for&str
and&String
.
0.10.3 - 2019-07-24
- Made
#[defun]
function signatures display correctly inhelp-mode
andhelpful-mode
.
0.10.2 - 2019-07-24
- Added
defun_prefix
option to#[module]
. - Fixed
#[defun]
not handling raw identifiers correctly.
0.10.1 - 2019-07-18
- Made
Vector::get
generic by return type. - Added
FromLisp
andIntoLisp
implementations for most integer types, and an optional featurelossy-integer-conversion
to control their behavior. This allows them to be used in#[defun]
signatures. - Made
Env::message
takeAsRef<str>
, not just a&str
.
0.10.0 - 2019-07-17
- Raised the minimum supported Rust version to 1.36 (for
MaybeUninit
). - Added
Vector
type to represent Lisp's vectors. - Allowed
Rc
andArc
to be embedded inuser-ptr
by marking them asTransfer
. - Removed
libc
dependency. - Removed
Transfer::finalizer
. - Deprecated
env.is_not_nil(value)
in favor ofvalue.is_not_nil()
. - Deprecated
env.eq(value1, value2)
in favor ofvalue1.eq(value2)
. - Improved Lisp-to-Rust string conversion's performance by making utf-8 validation optional, behind a feature,
utf-8-validation
. - Improved Rust-to-Lisp string conversion's performance by not creating a temporary
CString
. - Fixed a safety bug in which short-lived references were allowed to be embedded in
user-ptr
.
0.9.0 - 2019-07-11
ResultExt
is now a collection of Emacs-specific extension methods forResult
, instead of a re-export offailure::ResultExt
.- Added
failure
as a re-exported sub-mod. - Added
unwrap_or_propagate
for better panic handling: propagation of non-local exits withoutResult
, and improved error messages.
0.8.0 - 2019-04-20
- Input parameters with reference types are now interpreted as Rust data structures embedded in
user-ptr
objects. - Return values are now embedded in
user-ptr
objects ifuser_ptr
option is specified.
0.7.0 - 2019-04-15
- Greatly improved ergonomics with attribute macros
#[emacs::module]
and#[defun]
. - Deprecated macros with
emacs_
prefix. - Made
Value.env
public. - Removed the need for user crate to depend directly on
libc
. - Added lifetime parameter to
FromLisp
.
0.6.0 - 2019-03-26
- Upgraded to Rust 2018 edition.
0.5.2 - 2018-09-15
- New values obtained from
Env
are now GC-protected. This fixes memory issue #2.
0.5.1 - 2018-03-03
- Added
FromLisp
implementation forOption
. - Fixed
IntoLisp
not working onOption<&str>
.
0.5.0 - 2018-02-24
- Error handling integration with other Rust crates is improved:
- The exposed error type is now
failure::Error
. ErrorKind
enum now implementsfailure::Fail
.
- The exposed error type is now
- Redundant variants of
ErrorKind
were removed. - Errors in Rust code now signal custom error types to Lisp:
rust-error
rust-wrong-type-user-ptr
- Panics are now caught and signaled to Lisp as a special error type:
rust-panic
. env.is_not_nil
andenv.eq
now returnbool
instead ofResult
.
0.4.0 - 2018-02-18
- APIs now take
&Env
instead of&mut Env
. Value
s are no longer passed by reference, and are lifetime-scoped byEnv
.- Data conversion:
- Conversion is now simply
.into_rust()
and.into_lisp(env)
. RefCell
,Mutex
,RwLock
can be directly transferred to Lisp.- Many built-in types are now supported.
- Conversion is now simply
- Function declaration:
- Signatures of exportable functions are now simplified to
fn(&CallEnv) -> Result<T>
. emacs_subrs!
is replaced byemacs_export_functions!
.emacs_lambda!
can be used to create Lisp lambdas.
- Signatures of exportable functions are now simplified to
- Panics no longer unwind into C.
- Load/test scripts now work in Linux.
0.3.0 - 2018-01-09
- Values of Rust types that implement
Transfer
can be embedded in Lisp objects. - Wrapper types
Env
andValue
are now used instead of raw types.
0.2.0 - 2018-01-04
New reworked version