unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Troy Hinckley <comms@dabrev.com>
To: Sean Allred <allred.sean@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Consideration for Rust contributions in Emacs
Date: Sun, 22 Jan 2023 20:37:09 -0700	[thread overview]
Message-ID: <66c86c61-93ac-4723-81a4-ced034f61550@Spark> (raw)
In-Reply-To: <878rhuc79x.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4060 bytes --]

Thanks Sean!

I should have been clearer in my question that I don’t have any Rust code that I want to contribute to GNU Emacs, and I don’t know anyone who does. This is a hypothetical.

I don’t think Rust should be added to the Emacs core. The core is well tested and battle hardened C and Rust would not add much value.

I guess a clearer question would be: are there any fundamental/ideological reasons Rust could not be part of GNU Emacs? Ignoring technical trade offs and complexity etc.

Po Lu already provided one; Emacs needs to support old platforms like MS-DOS. So that rules out LLVM.

Are there others? I am particularly interested in issues surrounding licensing, such as the question I posed above about libraries.

On Jan 22, 2023 at 7:30 PM -0700, Sean Allred <allred.sean@gmail.com>, wrote:
> 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

[-- Attachment #2: Type: text/html, Size: 4849 bytes --]

  reply	other threads:[~2023-01-23  3:37 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
2023-01-23  3:37     ` Troy Hinckley [this message]
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=66c86c61-93ac-4723-81a4-ced034f61550@Spark \
    --to=comms@dabrev.com \
    --cc=allred.sean@gmail.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).