unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Sean Allred <allred.sean@gmail.com>
To: Troy Hinckley <comms@dabrev.com>
Cc: emacs-devel@gnu.org
Subject: Re: Consideration for Rust contributions in Emacs
Date: Sun, 22 Jan 2023 20:00:49 -0600	[thread overview]
Message-ID: <878rhuc79x.fsf@gmail.com> (raw)
In-Reply-To: <b972c046-8c29-42eb-92c9-0d5b5fe03551@Spark>

Hi Troy!

Thanks for raising the topic. I think this is my first time posting on
the list, but this is a topic that means quite a bit to me (and is
something I've had some experience with in other projects).

Using Rust in Emacs is an exciting prospect that draws on the general
buzz that Rust has been generating. I personally enjoy using Rust for
personal and professional projects alike. As you've noticed, though, its
use in Emacs is not without its concerns.

Troy Hinckley <comms@dabrev.com> writes:
> I've had a discussion with several people recently about future
> possibilities of Rust in GNU Emacs core. I could not find an answer to
> this on the archives, so if it has been resolved previously please
> point me to that thread.
>
> Let assume for the sake of this discussion that there was a some Rust
> code that someone wanted to contribute and the maintainers wanted the
> functionality it provided. What would be the consideration/objections?

I would add to your list of considerations that Rust is designed for an
almost singular purpose that it performs very well: memory-safety. I
don't pay *that* much attention to this list, but I also haven't seen
many bug reports concerning memory mismanagement -- and I certainly
haven't experienced any such bugs myself. I suspect this is due to the
relatively small C core that provides a memory-safe runtime for the
elisp that comprises the rest of emacs. Assuming memory-safety isn't a
demonstrated problem that emacs development struggles with,
incorporating Rust into its dev pipeline is going to be a very hard
sell:

    Does Rust actually solve a problem emacs has?

I don't know that the answer is 'no'. Frankly, I don't think I'm
qualified to offer an opinion here. More importantly to your goals, I
don't see where you've shown why you believe the answer is 'yes'.

In general (and this certainly doesn't apply to just emacs), to
introduce a new technology into a stable system, you'll need to be able
to demonstrate concrete gains that *measurably* outweigh the costs.
Introducing a new technology will inherently destablize any affected
components of the system -- this is very difficult to justify in any
large project. Feel-good syntax isn't usually a compelling reason --
especially in a project that's developed a lisp runtime where syntax is
already cheap to develop.

The last significant endeavor in this direction that I'm aware of was
Remacs -- but it appears development has petered out for one reason or
another. I don't think it's a lost cause in the grand scheme of things,
but this clearly is not a ship that can/would/should change course very
easily.

--

If it is something you are comfortable using and they meet your goals,
I'd like to point out the recent support for dynamic modules. Rust has
pretty solid FFI support in my experience. If needed, you may(?) have
better luck submitting patches to hook into / advise core functions in
lisp -- and then using those hooks in a dynamic module implemented in
the language of your choice.

-Sean

--
Sean Allred



  parent reply	other threads:[~2023-01-23  2:00 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f2ee2f1d-332f-4707-bd9e-23444c34749f@Spark>
2023-01-21 22:48 ` Consideration for Rust contributions in Emacs Troy Hinckley
2023-01-22  7:44   ` Po Lu via Emacs development discussions.
2023-01-22 11:05   ` Daniel Martín
2023-01-22 14:04     ` Po Lu
2023-01-22 23:16       ` Troy Hinckley
2023-01-23  5:55         ` Po Lu
2023-01-24  3:49         ` Richard Stallman
2023-01-24  3:52     ` Richard Stallman
2023-01-24  6:52       ` Dr. Arne Babenhauserheide
2023-01-23  2:00   ` Sean Allred [this message]
2023-01-23  3:37     ` Troy Hinckley
2023-01-23 12:25       ` Po Lu
2023-01-24  2:24         ` Lynn Winebarger
2023-01-24  2:47           ` Etienne Prud'homme
2023-01-24  2:49           ` Po Lu
2023-04-11 12:39         ` Po Lu via Emacs development discussions.
2023-04-11 18:23           ` Dr. Arne Babenhauserheide
2023-04-15  3:36             ` Richard Stallman
2023-04-15  3:40               ` Po Lu
2023-04-15  7:03                 ` Eli Zaretskii
2023-04-12  0:36           ` Dmitry Gutov
2023-04-12  4:59             ` tomas
2023-04-12 11:26           ` Richard Stallman
2023-04-13  1:02           ` Richard Stallman
2023-04-13  5:09             ` Eli Zaretskii
2023-04-13  8:23               ` Po Lu
2023-04-15 23:27             ` Dmitry Gutov
2023-04-16  0:11               ` Po Lu
2023-04-17  2:55                 ` Richard Stallman
2023-01-23 13:21       ` Dr. Arne Babenhauserheide
2023-01-23 16:51         ` John Yates
2023-01-23 17:06           ` Eli Zaretskii
2023-01-23 18:22             ` John Yates
2023-01-23 19:04               ` Eli Zaretskii
2023-01-23 19:44                 ` Bob Rogers
2023-01-23 19:56                   ` Eli Zaretskii
2023-01-23 20:08                     ` Bob Rogers
2023-01-23 19:22               ` Dr. Arne Babenhauserheide
2023-01-23 23:52               ` Po Lu
2023-01-24  0:45         ` Po Lu
2023-01-23  7:32     ` Robert Pluim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rhuc79x.fsf@gmail.com \
    --to=allred.sean@gmail.com \
    --cc=comms@dabrev.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).