Time for another Remacs update: lots of contributions, a wide range of features, and even a logo!
Since the last update, we’ve seen contributions from lots of new people. We’ve added @brotzeit and @shanavas786, bringing us to seven wonderful people who can approve your PRs.
Speaking of PRs, we’ve merged an amazing 64 pull requests since the last update!
If you’re looking for a good feature for your first contribution, @brotzeit has been regularly adding new suggestions under the ‘good first issue’ label.
Many Emacs features have now been ported to Rust, with new Rust APIs for accessing elisp datastructures.
Here’s an overview of the features that have landed.
Checksums: MD5sum (using a Rust MD5 crate!).
Fonts: type checks.
We’re also periodically pulling GNU Emacs features into Remacs, so all the features available GNU Emacs trunk are included in Remacs.
Idiomatic Rust in Remacs
Remacs has gradually developed a set of conventions for elisp data
types. For each type Foo, we define a
LispObject::as_foo_or_error and a
FooRef when you know your elisp
datatype is actually a Foo.
For example, here’s how
overlay-start was implemented in C:
The C codebase makes heavy use of macros for checking types
CHECK_OVERLAY) and for accessing struct attributes
Here’s the Rust equivalent:
We use procedural macros to simplify defining an elisp primitive function, and type checking is much more explicit.
(This example is from PR #298.)
Other exciting Rusty features
variadic macros to replace
call2 in C with just
call! in Rust,
the ability to mock extern C functions so we can write unit tests.
We’re not always able to leverage the Rust libraries available. @DavidDeSimone showed some amazing Rust-fu exploring using Rust’s FnvHashMap inside Remacs.
Sadly, we weren’t able to use the Rust hash map implementation. The C
layer assumes that it can mutate hash table keys in place, and
unexec does not play nicely with
mmap. See the PR for the full details.
Finally, we’re discussing a logo for Remacs. We’ve had some great submissions:
You can join the logo discussion at PR #360.
As always, if you fancy writing some Rust in support of the world’s lispiest text editor, you can join us on GitHub!