7
submitted 1 year ago by djtech@lemmy.world to c/rustlang@lemmyrs.org

Hi, I Just started working on a Emacs-inspired text editor in Rust.

Being insipred by Emacs, the most important part Is the possibiliy to implement new components.

My ideas were:

  • Rust-based scripting language, like Rhai
  • RustPython (slower, but more compatible and lots of people know Python)
  • PyO3 (Bigger executable and not that fast)
  • Wasm/Wasi (Cross-platform, but I don't know if the compatibility with Rust's hosted functions and structs is good)
  • Other binded language, like V8, Lua or SpiderMonkey
  • Compiled plugins, like .so or .DLL (Fast, but not compatible; there should be Rust plugin frameworks for implementing this, but I don't remember the name)

The elements to analyze are: speednees (consider it's a text editor, so...), easy-to-develop and Cross-platform (if possible, not that important), but the possibility to execute functions in the host Rust program is EXTREMELY important.

Thoughts?

Thanks in Advance.

you are viewing a single comment's thread
view the rest of the comments
[-] vilcans@programming.dev 2 points 1 year ago

One way to implement Rust-based "plugins" is to turn the whole application/plugins relation on its head: Publish the main application as a crate, which lets the user build their own executable that uses the main application as a library. That way they can customize the app however they like, if the main app just has hooks for it.

this post was submitted on 16 Jul 2023
7 points (88.9% liked)

Rust Lang

58 readers
1 users here now

Rules [Developing]

Observe our code of conduct

Constructive criticism only

No endless relitigation

No low-effort content

No memes or image macros

No NSFW Content

founded 1 year ago
MODERATORS