Rust :heart: Emacs

Overview

Rust ❤️ Emacs

Join the chat at https://gitter.im/remacs-discuss/Lobby Build Status

A community-driven port of Emacs to Rust.

Table of Contents

Why Emacs?

Emacs will change how you think about programming.

Emacs is totally introspectable. You can always find out 'what code runs when I press this button?'.

Emacs is an incremental programming environment. There's no edit-compile-run cycle. There isn't even an edit-run cycle. You can execute snippets of code and gradually turn them into a finished project. There's no distinction between your editor and your interpreter.

Emacs is a mutable environment. You can set variables, tweak functions with advice, or redefine entire functions. Nothing is off-limits.

Emacs provides functionality without applications. Rather than separate applications, functionality is all integrated into your Emacs instance. Amazingly, this works. Ever wanted to use the same snippet tool for writing C++ classes as well as emails?

Emacs is full of incredible software concepts that haven't hit the mainstream yet. For example:

  • Many platforms have a single item clipboard. Emacs has an infinite clipboard.
  • If you undo a change, and then continue editing, you can't redo the original change. Emacs allows undoing to any historical state, even allowing tree-based exploration of history.
  • Emacs supports a reverse variable search: you can find variables with a given value.
  • You can perform structural editing of code, allowing you to make changes without breaking syntax. This works for lisps (paredit) and non-lisps (smartparens).
  • Many applications use a modal GUI: for example, you can't do other edits during a find-and-replace operation. Emacs provides recursive editing that allow you to suspend what you're currently doing, perform other edits, then continue the original task.

Emacs has a documentation culture. Emacs includes a usage manual, a lisp programming manual, pervasive docstrings and even an interactive tutorial.

Emacs has a broad ecosystem. If you want to edit code in a niche language, there's probably an Emacs package for it.

Emacs doesn't have a monopoly on good ideas, and there are other great tools out there. Nonetheless, we believe the Emacs learning curve pays off.

Why Rust?

Rust is a great alternative to C.

Rust has a fantastic learning curve. The documentation is superb, and the community is very helpful if you get stuck.

Rust has excellent tooling. The compiler makes great suggestions, the unit test framework is good, and rustfmt helps ensure formatting is beautiful and consistent.

The Rust packaging story is excellent. It's easy to reuse the great libraries available, and just as easy to factor out code for the benefit of others. We can replace entire C files in Emacs with well-maintained Rust libraries.

Code written in Rust easily interoperates with C. This means we can port to Rust incrementally, and having a working Emacs at each step of the process.

Rust provides many compile-time checks, making it much easier to write fast, correct code (even when using multithreading). This also makes it much easier for newcomers to contribute.

Give it a try. We think you'll like it.

Why A Fork?

Emacs is a widely used tool with a long history, broad platform support and strong backward compatibility requirements. The core team is understandably cautious in making far-reaching changes.

Forking is a longstanding tradition in the Emacs community for trying different approaches. Notable Emacs forks include XEmacs, Guile Emacs, and emacs-jit.

There have also been separate elisp implementations, such as Deuce, JEmacs and El Compilador.

By forking, we can explore new development approaches. We can use a pull request workflow with integrated CI.

We can drop legacy platforms and compilers. Remacs will never run on MS-DOS, and that's OK.

There's a difference between the idea of Emacs and the current implementation of Emacs. Forking allows us to explore being even more Emacs-y.

Getting Started

Requirements

  1. You will need Rust installed. The file rust-toolchain indicates the version that gets installed. This happens automatically, so don't override the toolchain manually. IMPORTANT: Whenever the toolchain updates, you have to reinstall rustfmt manually.

  2. You will need a C compiler and toolchain. On Linux, you can do something like:

     apt install build-essential automake clang libclang-dev
    

    On macOS, you'll need Xcode.

  3. Linux:

     apt install texinfo libjpeg-dev libtiff-dev \
       libgif-dev libxpm-dev libgtk-3-dev gnutls-dev \
       libncurses5-dev libxml2-dev libxt-dev
    

    macOS:

     brew install gnutls texinfo autoconf
    

    To use the installed version of makeinfo instead of the built-in (/usr/bin/makeinfo) one, you'll need to make sure /usr/local/opt/texinfo/bin is before /usr/bin in PATH. Mojave install libxml2 headers with: open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

Dockerized development environment

If you don't want to bother with the above setup you can use the provided Docker environment. Make sure you have docker 1.12+ and docker-compose 1.8+ available.

To spin up the environment run

docker-compose up -d

The first time you run this command, Docker will build the image. After that any subsequent startups will happen in less than a second. If this command fails because of needing absolute paths, make sure to set the PWD environment variable before calling the command like so:

PWD=$(pwd) docker-compose up -d

The working directory with remacs will be mounted under the same path in the container so editing the files on your host machine will automatically be reflected inside the container. To build remacs use the steps from Building Remacs prefixed with docker-compose exec remacs, this will ensure the commands are executed inside the container.

Building Remacs

$ ./autogen.sh
$ ./configure --enable-rust-debug
$ make

For a release build, don't pass --enable-rust-debug.

The Makefile obeys cargo's RUSTFLAGS variable and additional options can be passed to cargo with CARGO_FLAGS.

For example:

$ make CARGO_FLAGS="-vv" RUSTFLAGS="-Zunstable-options --cfg MARKER_DEBUG"

Running Remacs

You can now run your shiny new Remacs build!

# Using -q to ignore your .emacs.d, so Remacs starts up quickly.
# RUST_BACKTRACE is optional, but useful if your instance crashes.
$ RUST_BACKTRACE=1 src/remacs -q

Design Goals

Compatibility: Remacs should not break existing elisp code, and ideally provide the same FFI too.

Leverage Rust itself: Remacs should make best use of Rust to ensure code is robust and performant.

Leverage the Rust ecosystem: Remacs should use existing Rust crates wherever possible, and create new, separate crates where our code could benefit others.

Great docs: Emacs has excellent documentation, Remacs should be no different.

Progress

At this point we focus on porting lisp functions from C to Rust. Currently there are 642 functions in Rust and 823 in C (May 2019).

We have a progress section in our wiki and there's also a list of long-term goals under projects.

Porting Elisp Primitive Functions

The first thing to look at is the C implementation for the atan function. It takes an optional second argument, which makes it interesting. The complicated mathematical bits, on the other hand, are handled by the standard library. This allows us to focus on the porting process without getting distracted by the math.

The Lisp values we are given as arguments are tagged pointers; in this case they are pointers to doubles. The code has to check the tag and follow the pointer to retrieve the real values. Note that this code invokes a C macro (called DEFUN) that reduces some of the boilerplate. The macro declares a static variable called Satan that holds the metadata the Lisp compiler will need in order to successfully call this function, such as the docstring and the pointer to the Fatan function, which is what the C implementation is named:

DEFUN ("atan", Fatan, Satan, 1, 2, 0,
       doc: /* Return the inverse tangent of the arguments.
If only one argument Y is given, return the inverse tangent of Y.
If two arguments Y and X are given, return the inverse tangent of Y
divided by X, i.e. the angle in radians between the vector (X, Y)
and the x-axis.  */)
  (Lisp_Object y, Lisp_Object x)
{
  double d = extract_float (y);
  if (NILP (x))
    d = atan (d);
  else
    {
      double d2 = extract_float (x);
      d = atan2 (d, d2);
    }
  return make_float (d);
}

extract_float checks the tag (signalling an "invalid argument" error if it's not the tag for a double), and returns the actual value. NILP checks to see if the tag indicates that this is a null value, indicating that the user didn't supply a second argument at all.

Next take a look at the current Rust implementation. It must also take an optional argument, and it also invokes a (Rust) macro to reduce the boilerplate of declaring the static data for the function. However, it also takes care of all of the type conversions and checks that we need to do in order to handle the arguments and return value:

/// Return the inverse tangent of the arguments.
/// If only one argument Y is given, return the inverse tangent of Y.
/// If two arguments Y and X are given, return the inverse tangent of Y
/// divided by X, i.e. the angle in radians between the vector (X, Y)
/// and the x-axis
#[lisp_fn(min = "1")]
pub fn atan(y: EmacsDouble, x: Option<EmacsDouble>) -> EmacsDouble {
    match x {
        None => y.atan(),
        Some(x) => y.atan2(x)
    }
}

You can see that we don't have to check to see if our arguments are of the correct type, the code generated by the lisp_fn macro does this for us. We also asked for the second argument to be an Option<EmacsDouble>. This is the Rust type for a value which is either a valid double or isn't specified at all. We use a match statement to handle both cases.

This code is so much better that it's hard to believe just how simple the implementation of the macro is. It just calls .into() on the arguments and the return value; the compiler does the rest when it dispatches this method call to the correct implementation.

Contributing

Pull requests welcome, no copyright assignment required. This project is under the Rust code of conduct.

There's lots to do! We keep a list of low hanging fruit here so you can easily choose one. You can find information in the Porting cookbook or ask for help in our Gitter channel.

Comments
  • OS X compile fails with 'Invalid function: cdr'

    OS X compile fails with 'Invalid function: cdr'

    When building on MacOS, assuming PR #37 is applied, the build terminates as follows

    4480 unused bytes follow Mach-O header
    89147 pure bytes used
    mv -f remacs bootstrap-emacs
    /Applications/Xcode.app/Contents/Developer/usr/bin/make -C ../lisp compile-first EMACS="../src/bootstrap-emacs"
      ELC      emacs-lisp/macroexp.elc
    Invalid function: eq
    make[2]: *** [emacs-lisp/macroexp.elc] Error 255
    make[1]: *** [bootstrap-emacs] Error 2
    make: *** [src] Error 2
    

    eq appears to be defined in rust_src/src/strings.rs but doesn't make it in to bootstrap-emacs as a symbol

    $ strings src/bootstrap-emacs | grep eq
    [ not there ]
    

    whereas stringp which is also defined in rust_src/src/strings.rs is a symbol

    $ strings src/bootstrap-emacs| grep stringp
    stringp
    stringp
    
    opened by rogermarlow 41
  • Port subset of dired.c to rust

    Port subset of dired.c to rust

    I have the following ported from dired.c

    • directory_files_internal
    • directory-files
    • directory-files-and-attributes
    • file-attributes
    • file-attributes-lessp
    • system-users

    Not ported from dired.c:

    • file_name_completion and related funcs --it's a beast and worthy of a seperate proj

    • system-groups --it appears no rust equiv (in libc anyways) of Linux's getgrent(3).

    Note:

    • only tested on Linux (only OS avail to me at the moment)
    • 'make' and test/ 'make check' clean (dired&tramp seem to be well covered here)
    • Note tramp basic ssh usage seems badly broken in 27.0.50. FWIW I tracked it to find-file-name-handler not matching expected tramp regex. The new code here fails same way and passes make check tramp suite so I asssume it's ok.
    • Multibyte regex maching of multibyte filenames works in directory-files. Added a small recipe at bottom of dired_rust.rs to test this by hand.
    • rustfmt clean
    • docstrings added for lisp funcs
    help wanted 
    opened by gaak99 31
  • Linux: Unable to find libclang

    Linux: Unable to find libclang

    After resync w/upstream last night seeing this:

    (was all good 24 hours ago, also same problem on fresh clone today of remacs, I've not touched clang but have done some Ubuntu updates this week, ideas?)

    cargo build --release --manifest-path ../rust_src/Cargo.toml
       Compiling remacs v0.1.0 (file:///home/gb/warez/remacs-wtf-v8/remacs/rust_src)
    error: failed to run custom build command for `remacs v0.1.0 (file:///home/gb/warez/remacs-wtf-v8/remacs/rust_src)`
    process didn't exit successfully: `/home/gb/warez/remacs-wtf-v8/remacs/rust_src/target/release/build/remacs-f5a2b8cf84118c26/build-script-build` (exit code: 101)
    --- stdout
    cargo:rerun-if-env-changed=EMACS_CFLAGS
    cargo:rerun-if-env-changed=SRC_HASH
    
    --- stderr
    thread 'main' panicked at 'Unable to find libclang: "couldn\'t find any of [\'libclang.so\', \'libclang.so.*\', \'libclang-*.so\'], set the LIBCLANG_PATH environment variable to a path where one of these files can be found (skipped: [])"', libcore/result.rs:945:5
    note: Run with `RUST_BACKTRACE=1` for a backtrace.
    
    Makefile:610: recipe for target '../rust_src/target/release/libremacs_lib.a' failed
    make[1]: *** [../rust_src/target/release/libremacs_lib.a] Error 101
    
    opened by gaak99 30
  • Address boundary error

    Address boundary error

    Trying to start remacs 31231ecd3b7cca5860bfe0388e425d6926a5790a I get this

    Fatal error 11: Segmentation fault
    Backtrace:
    /home/torstein/progs/remacs/src/remacs[0x500e04]
    /home/torstein/progs/remacs/src/remacs[0x4e9584]
    /home/torstein/progs/remacs/src/remacs[0x4ff6ee]
    /home/torstein/progs/remacs/src/remacs[0x4ff8e8]
    /home/torstein/progs/remacs/src/remacs[0x4ff959]
    /usr/lib64/libpthread.so.0(+0x13070)[0x7f9f1a7f7070]
    /home/torstein/progs/remacs/src/remacs[0x5a32e9]
    /home/torstein/progs/remacs/src/remacs[0x5a4671]
    /home/torstein/progs/remacs/src/remacs[0x5a6be9]
    /home/torstein/progs/remacs/src/remacs[0x55cd8d]
    /home/torstein/progs/remacs/src/remacs[0x5f4062]
    /home/torstein/progs/remacs/src/remacs[0x5f3b65]
    /home/torstein/progs/remacs/src/remacs[0x5cd446]
    /home/torstein/progs/remacs/src/remacs[0x57a5c0]
    /home/torstein/progs/remacs/src/remacs[0x54ec5a]
    /home/torstein/progs/remacs/src/remacs[0x5cd3ce]
    /home/torstein/progs/remacs/src/remacs[0x57a5c0]
    /home/torstein/progs/remacs/src/remacs[0x54ec5a]
    /home/torstein/progs/remacs/src/remacs[0x5cd3ce]
    /home/torstein/progs/remacs/src/remacs[0x57a5c0]
    /home/torstein/progs/remacs/src/remacs[0x54f2c4]
    /home/torstein/progs/remacs/src/remacs[0x56ab95]
    /home/torstein/progs/remacs/src/remacs[0x56b37c]
    /home/torstein/progs/remacs/src/remacs[0x5cd446]
    /home/torstein/progs/remacs/src/remacs[0x57a5c0]
    /home/torstein/progs/remacs/src/remacs[0x5cd3ce]
    /home/torstein/progs/remacs/src/remacs[0x57a5c0]
    /home/torstein/progs/remacs/src/remacs[0x5cd3ce]
    /home/torstein/progs/remacs/src/remacs[0x57a5c0]
    /home/torstein/progs/remacs/src/remacs[0x54f5c6]
    /home/torstein/progs/remacs/src/remacs[0x54f02d]
    /home/torstein/progs/remacs/src/remacs[0x5cc3b1]
    fish: Job 2, “~/progs/remacs/src/remacs  $argv” terminated by signal SIGSEGV (Address boundary error)
    

    Fedora 29

    opened by tsoernes 29
  • Linux 32 bits build is broken

    Linux 32 bits build is broken

    Debug:

    Starting program: /home/jeandudey/rust-projects/remacs/src/temacs --batch --loadup bootstrap
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/usr/lib/libthread_db.so.1".
    
    Program received signal SIGSEGV, Segmentation fault.
    0x0822d1b2 in remacs::lists::XCAR (object=LispObject = {...}) at /home/jeandudey/rust-projects/remacs/rust_src/src/lists.rs:151
    151	    (*XCONS(object)).car
    (gdb) bt
    #0  0x0822d1b2 in remacs::lists::XCAR (object=LispObject = {...}) at /home/jeandudey/rust-projects/remacs/rust_src/src/lists.rs:151
    #1  0x0822d291 in remacs::lists::car (object=LispObject = {...}) at /home/jeandudey/rust-projects/remacs/rust_src/src/lists.rs:166
    #2  0x0822d454 in remacs::lists::Fcar (list=LispObject = {...}) at /home/jeandudey/rust-projects/remacs/rust_src/src/lists.rs:185
    #3  0x081aa768 in print_error_message (data=<optimized out>, stream=<optimized out>, context=<optimized out>, caller=<optimized out>) at print.c:907
    #4  0x081aaa2c in Ferror_message_string (obj=140488155) at print.c:868
    #5  0x0818f827 in signal_or_quit (error_symbol=error_symbol@entry=26328, data=140488155, data@entry=140488139, keyboard_quit=keyboard_quit@entry=false) at eval.c:1603
    #6  0x0818fb82 in Fsignal (error_symbol=26328, data=140488139) at eval.c:1483
    #7  0x081901bc in xsignal (data=<optimized out>, error_symbol=26328) at lisp.h:3817
    #8  0x081901bc in xsignal2 (error_symbol=26328, arg1=-1073749392, arg2=16056) at eval.c:1624
    #9  0x0817b0e5 in wrong_type_argument (predicate=-1073749392, value=16056) at data.c:152
    #10 0x0822d310 in remacs::lists::car (object=LispObject = {...}) at /home/jeandudey/rust-projects/remacs/rust_src/src/lists.rs:170
    #11 0x0822d454 in remacs::lists::Fcar (list=LispObject = {...}) at /home/jeandudey/rust-projects/remacs/rust_src/src/lists.rs:185
    #12 0x081aa768 in print_error_message (data=<optimized out>, stream=<optimized out>, context=<optimized out>, caller=<optimized out>) at print.c:907
    #13 0x081aaa2c in Ferror_message_string (obj=140488123) at print.c:868
    #14 0x0818f827 in signal_or_quit (error_symbol=error_symbol@entry=26328, data=140488123, data@entry=140488107, keyboard_quit=keyboard_quit@entry=false) at eval.c:1603
    #15 0x0818fb82 in Fsignal (error_symbol=26328, data=140488107) at eval.c:1483
    #16 0x081901bc in xsignal (data=<optimized out>, error_symbol=26328) at lisp.h:3817
    #17 0x081901bc in xsignal2 (error_symbol=26328, arg1=-1073748896, arg2=16056) at eval.c:1624
    #18 0x0817b0e5 in wrong_type_argument (predicate=-1073748896, value=16056) at data.c:152
    #19 0x0822d310 in remacs::lists::car (object=LispObject = {...}) at /home/jeandudey/rust-projects/remacs/rust_src/src/lists.rs:170
    #20 0x0822d454 in remacs::lists::Fcar (list=LispObject = {...}) at /home/jeandudey/rust-projects/remacs/rust_src/src/lists.rs:185
    #21 0x081aa768 in print_error_message (data=<optimized out>, stream=<optimized out>, context=<optimized out>, caller=<optimized out>) at print.c:907
    #22 0x081aaa2c in Ferror_message_string (obj=140488091) at print.c:868
    #23 0x0818f827 in signal_or_quit (error_symbol=error_symbol@entry=26328, data=140488091, data@entry=140488075, keyboard_quit=keyboard_quit@entry=false) at eval.c:1603
    #24 0x0818fb82 in Fsignal (error_symbol=26328, data=140488075) at eval.c:1483
    #25 0x081901bc in xsignal (data=<optimized out>, error_symbol=26328) at lisp.h:3817
    #26 0x081901bc in xsignal2 (error_symbol=26328, arg1=-1073748400, arg2=16056) at eval.c:1624
    #27 0x0817b0e5 in wrong_type_argument (predicate=-1073748400, value=16056) at data.c:152
    #28 0x0822d310 in remacs::lists::car (object=LispObject = {...}) at /home/jeandudey/rust-projects/remacs/rust_src/src/lists.rs:170
    #29 0x0822d454 in remacs::lists::Fcar (list=LispObject = {...}) at /home/jeandudey/rust-projects/remacs/rust_src/src/lists.rs:185
    #30 0x081aa768 in print_error_message (data=<optimized out>, stream=<optimized out>, context=<optimized out>, caller=<optimized out>) at print.c:907
    #31 0x081aaa2c in Ferror_message_string (obj=140488059) at print.c:868
    #32 0x0818f827 in signal_or_quit (error_symbol=error_symbol@entry=26328, data=140488059, data@entry=140488043, keyboard_quit=keyboard_quit@entry=false) at eval.c:1603
    #33 0x0818fb82 in Fsignal (error_symbol=26328, data=140488043) at eval.c:1483
    #34 0x081901bc in xsignal (data=<optimized out>, error_symbol=26328) at lisp.h:3817
    #35 0x081901bc in xsignal2 (error_symbol=26328, arg1=-1073747904, arg2=16056) at eval.c:1624
    #36 0x0817b0e5 in wrong_type_argument (predicate=-1073747904, value=16056) at data.c:152
    #37 0x0822d310 in remacs::lists::car (object=LispObject = {...}) at /home/jeandudey/rust-projects/remacs/rust_src/src/lists.rs:170
    #38 0x0822d454 in remacs::lists::Fcar (list=LispObject = {...}) at /home/jeandudey/rust-projects/remacs/rust_src/src/lists.rs:185
    #39 0x081aa768 in print_error_message (data=<optimized out>, stream=<optimized out>, context=<optimized out>, caller=<optimized out>) at print.c:907
    #40 0x081aaa2c in Ferror_message_string (obj=140488027) at print.c:868
    #41 0x0818f827 in signal_or_quit (error_symbol=error_symbol@entry=26328, data=140488027, data@entry=140488011, keyboard_quit=keyboard_quit@entry=false) at eval.c:1603
    ---Type <return> to continue, or q <return> to quit---
    #42 0x0818fb82 in Fsignal (error_symbol=26328, data=140488011) at eval.c:1483
    #43 0x081901bc in xsignal (data=<optimized out>, error_symbol=26328) at lisp.h:3817
    #44 0x081901bc in xsignal2 (error_symbol=26328, arg1=-1073747408, arg2=16056) at eval.c:1624
    #45 0x0817b0e5 in wrong_type_argument (predicate=-1073747408, value=16056) at data.c:152
    #46 0x0822d310 in remacs::lists::car (object=LispObject = {...}) at /home/jeandudey/rust-projects/remacs/rust_src/src/lists.rs:170
    #47 0x0822d454 in remacs::lists::Fcar (list=LispObject = {...}) at /home/jeandudey/rust-projects/remacs/rust_src/src/lists.rs:185
    #48 0x081aa768 in print_error_message (data=<optimized out>, stream=<optimized out>, context=<optimized out>, caller=<optimized out>) at print.c:907
    #49 0x081aaa2c in Ferror_message_string (obj=140487995) at print.c:868
    #50 0x0818f827 in signal_or_quit (error_symbol=error_symbol@entry=26328, data=140487995, data@entry=140487979, keyboard_quit=keyboard_quit@entry=false) at eval.c:1603
    #51 0x0818fb82 in Fsignal (error_symbol=26328, data=140487979) at eval.c:1483
    #52 0x081901bc in xsignal (data=<optimized out>, error_symbol=26328) at lisp.h:3817
    #53 0x081901bc in xsignal2 (error_symbol=26328, arg1=-1073746912, arg2=16056) at eval.c:1624
    #54 0x0817b0e5 in wrong_type_argument (predicate=-1073746912, value=16056) at data.c:152
    #55 0x0822d310 in remacs::lists::car (object=LispObject = {...}) at /home/jeandudey/rust-projects/remacs/rust_src/src/lists.rs:170
    #56 0x0822d454 in remacs::lists::Fcar (list=LispObject = {...}) at /home/jeandudey/rust-projects/remacs/rust_src/src/lists.rs:185
    #57 0x081aa768 in print_error_message (data=<optimized out>, stream=<optimized out>, context=<optimized out>, caller=<optimized out>) at print.c:907
    #58 0x081aaa2c in Ferror_message_string (obj=140487963) at print.c:868
    #59 0x0818f827 in signal_or_quit (error_symbol=error_symbol@entry=26328, data=140487963, data@entry=140487947, keyboard_quit=keyboard_quit@entry=false) at eval.c:1603
    #60 0x0818fb82 in Fsignal (error_symbol=26328, data=140487947) at eval.c:1483
    #61 0x081901bc in xsignal (data=<optimized out>, error_symbol=26328) at lisp.h:3817
    #62 0x081901bc in xsignal2 (error_symbol=26328, arg1=-1073746416, arg2=16056) at eval.c:1624
    #63 0x0817b0e5 in wrong_type_argument (predicate=-1073746416, value=16056) at data.c:152
    #64 0x0822d400 in remacs::lists::cdr (object=LispObject = {...}) at /home/jeandudey/rust-projects/remacs/rust_src/src/lists.rs:179
    #65 0x0822d4b4 in remacs::lists::Fcdr (list=LispObject = {...}) at /home/jeandudey/rust-projects/remacs/rust_src/src/lists.rs:206
    #66 0x081414e0 in Fget_buffer_create (buffer_or_name=137842796) at buffer.c:509
    #67 0x081459d5 in init_buffer_once () at buffer.c:5234
    #68 0x0805d20c in main (argc=<optimized out>, argv=<optimized out>) at emacs.c:1172
    
    
    opened by jeandudey 27
  • Implement From<Vec<T>> for LispObject and convert one use

    Implement From> for LispObject and convert one use

    This came out of the discussion in #1148 where the return value for load-average/load_average ended up being too generic.

    This lets us return Vec<LispNumber> from a function we want to expose to lisp.

    opened by carlosmn 25
  • remacs panic because of a Result::unwrap()

    remacs panic because of a Result::unwrap()

    In a shell I run: /usr/bin/emacsclient somefile and remacs crashes.

    Here the backtrace:

    thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "\x80\xC0\xFA\xE3\u{10}V"', libcore/result.rs:1009:5
    stack backtrace:
       0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
                 at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
       1: std::sys_common::backtrace::_print
                 at libstd/sys_common/backtrace.rs:71
       2: std::panicking::default_hook::{{closure}}
                 at libstd/sys_common/backtrace.rs:59
                 at libstd/panicking.rs:211
       3: std::panicking::default_hook
                 at libstd/panicking.rs:227
       4: std::panicking::rust_panic_with_hook
                 at libstd/panicking.rs:476
       5: std::panicking::continue_panic_fmt
                 at libstd/panicking.rs:390
       6: rust_begin_unwind
                 at libstd/panicking.rs:325
       7: core::panicking::panic_fmt
                 at libcore/panicking.rs:77
       8: core::result::unwrap_failed
       9: remacs::dired_unix::fnames_from_os
      10: remacs::dired_unix::directory_files_core
      11: remacs::dired_unix::directory_files_intro
      12: remacs::eval::funcall
      13: exec_byte_code
                 at /data/vc/remacs/src/bytecode.c:621
      14: remacs::eval::funcall
      15: exec_byte_code
                 at /data/vc/remacs/src/bytecode.c:621
      16: remacs::eval::funcall
      17: exec_byte_code
                 at /data/vc/remacs/src/bytecode.c:621
      18: remacs::eval::funcall
      19: exec_byte_code
                 at /data/vc/remacs/src/bytecode.c:621
      20: remacs::eval::funcall
      21: <unknown>
    
    Backtrace:
    /home/manfred/VC/remacs/src/remacs[0x502174]
    /home/manfred/VC/remacs/src/remacs[0x4ea554]
    /home/manfred/VC/remacs/src/remacs[0x500a5e]
    /home/manfred/VC/remacs/src/remacs[0x500c58]
    /home/manfred/VC/remacs/src/remacs[0x500d39]
    /lib64/libpthread.so.0(+0x13030)[0x7f25bf2af030]
    /lib64/libc.so.6(gsignal+0x10f)[0x7f25bee5b53f]
    /lib64/libc.so.6(abort+0x127)[0x7f25bee45895]
    /home/manfred/VC/remacs/src/remacs[0x6cd9a7]
    /home/manfred/bin/remacs: line 3: 20271 Aborted                 (core dumped) /home/manfred/VC/remacs/src/remacs
    
    bug Active PR 
    opened by manfredlotz 24
  • add libvterm support

    add libvterm support

    I have a TODO list of the review from the old PR, but I would like to get this merged as I still hope I get some help with this =)

    However I still have problems with configure.ac. I can't get this to work. .rustified_enum("VTermProp") doesn't work since #1185. It worked before...

    Apart from that, it seems to be usable. But resizing needs to get fixed.

    opened by brotzeit 23
  • fix list-fonts

    fix list-fonts

    Closes #1444.

    Fixes segmentation fault introduced in https://github.com/remacs/remacs/pull/1371 and discussed in https://github.com/remacs/remacs/issues/1444

    The crash was caused by applying an unnecessary tag to the pointer during LispFontSpecRef -> LispObject conversion

    Repro:

    evaluate (list-fonts (font-spec :size 10)) Remacs returns nil (or crashes without this fix) Emacs returns a list of fonts

    opened by ngortheone 21
  • re-builder freezes buffers

    re-builder freezes buffers

    When I start M-x re-builder in a clean remacs instance (started with src/remacs -Q) all buffers freezes, however it seems that the application is responsive in some way, the mini-buffer is updating on events and pop-ups are opened when I force quit the application but other than that it's frozen.

    opened by cjohansson 21
  • [Proposal] Delete all x-toolkit except `gtk3`.

    [Proposal] Delete all x-toolkit except `gtk3`.

    Currently, Emacs has quite a few x-toolkit choices for Linux platform.

    • gtk
    • gtk2
    • gtk3
    • lucid
    • motif
    • no-toolkit

    Shall we just keep the gtk3 and remove all the other x-toolkit? The related code will be simpler and cleaner. I believe it will be helpful for our porting.

    opened by harryfei 20
  • [make error] sysdep.c:1741:22: error: variably modified 'sigsegv_stack' at file scope

    [make error] sysdep.c:1741:22: error: variably modified 'sigsegv_stack' at file scope

    this is what I get when running make

    steiner@nesteiner ~/workspace/remacs (git)-[master] % make          
    make -C lib all
    make[1]: Entering directory '/home/steiner/workspace/remacs/lib'
    make[1]: Nothing to be done for 'all'.
    make[1]: Leaving directory '/home/steiner/workspace/remacs/lib'
    make -C lib-src all
    make[1]: Entering directory '/home/steiner/workspace/remacs/lib-src'
    make[1]: Nothing to be done for 'all'.
    make[1]: Leaving directory '/home/steiner/workspace/remacs/lib-src'
    make -C src VCSWITNESS='$(srcdir)/../.git/logs/HEAD' all
    make[1]: Entering directory '/home/steiner/workspace/remacs/src'
      CC       sysdep.o
    gcc: warning: switch '-Wchkp' is no longer supported
    cc1: warning: '-Wabi' won't warn about anything [-Wabi]
    cc1: note: '-Wabi' warns about differences from the most up-to-date ABI, which is also used by default
    cc1: note: use e.g. '-Wabi=11' to warn about changes from GCC 7
    sysdep.c:1741:22: error: variably modified 'sigsegv_stack' at file scope
     1741 | static unsigned char sigsegv_stack[SIGSTKSZ];
          |                      ^~~~~~~~~~~~~
    make[1]: *** [Makefile:389: sysdep.o] Error 1
    make[1]: Leaving directory '/home/steiner/workspace/remacs/src'
    make: *** [Makefile:429: src] Error 2
    
    opened by nesteiner 0
  • To rust is to miss the point

    To rust is to miss the point

    Emac's greatest problems are those parts not written in lisp. Rust is not a lisp. Here, lisp is used in its 'genotype' meaning, and is therefore not targetting any implementation. The 'performance-critical' portions of emacs obviously need to target an appropriate implementation. The lisp MOP-centered genotype will eventually match any performance/efficiency benchmark (reference).

    There will be no followup on github.

    opened by maisiliym 0
  • error: unexpected closing delimiter: `]` in src/../generated/bindings.rs:15424:39

    error: unexpected closing delimiter: `]` in src/../generated/bindings.rs:15424:39

    Using an updated, distcleaned source, and also with the Arch Linux AUR package (remacs-git):

    error: unexpected closing delimiter:]` --> src/../generated/bindings.rs:15424:39 | 15419 | pub struct Lisp_String { | - this opening brace... 15420 | pub u: Lisp_String__bindgen_ty_1, 15421 | } | - ...matches this closing brace ... 15424 | # [ derive ( Copy , Clone ) ]; 4usize ] , }# [ repr ( C ) ] | ^ unexpected closing delimiter

    error: aborting due to previous error

    error: could not compile remacs.

    Caused by: process didn't exit successfully: rustc --crate-name remacs --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type staticlib --emit=dep-info,link -C panic=abort -Cembed-bitcode=no -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="unexec"' --cfg 'feature="use-xml2"' --cfg 'feature="window-system"' --cfg 'feature="window-system-x11"' -C metadata=ea414e57a2dd3fa4 -C extra-filename=-ea414e57a2dd3fa4 --out-dir /usr/local/src/remacs/rust_src/target/debug/deps -C incremental=/usr/local/src/remacs/rust_src/target/debug/incremental -L dependency=/usr/local/src/remacs/rust_src/target/debug/deps --extern base64=/usr/local/src/remacs/rust_src/target/debug/deps/libbase64-13f04ca6589e9c34.rlib --extern cfg_if=/usr/local/src/remacs/rust_src/target/debug/deps/libcfg_if-eb569dc908f26788.rlib --extern errno=/usr/local/src/remacs/rust_src/target/debug/deps/liberrno-a4de0e8b07aad1ec.rlib --extern field_offset=/usr/local/src/remacs/rust_src/target/debug/deps/libfield_offset-a72105e6cdcb0671.rlib --extern flate2=/usr/local/src/remacs/rust_src/target/debug/deps/libflate2-9e757549d0dadb71.rlib --extern itertools=/usr/local/src/remacs/rust_src/target/debug/deps/libitertools-42e127e39d73a43f.rlib --extern lazy_static=/usr/local/src/remacs/rust_src/target/debug/deps/liblazy_static-4ae020ed14010134.rlib --extern libc=/usr/local/src/remacs/rust_src/target/debug/deps/liblibc-04bc34b16497a97c.rlib --extern line_wrap=/usr/local/src/remacs/rust_src/target/debug/deps/libline_wrap-fd27a733b66dee4e.rlib --extern md5=/usr/local/src/remacs/rust_src/target/debug/deps/libmd5-33468d36fadb9d75.rlib --extern rand=/usr/local/src/remacs/rust_src/target/debug/deps/librand-5fd97671e1481f9e.rlib --extern remacs_lib=/usr/local/src/remacs/rust_src/target/debug/deps/libremacs_lib-55c126ef522df753.rlib --extern remacs_macros=/usr/local/src/remacs/rust_src/target/debug/deps/libremacs_macros-66b3cfe3fea4ae03.so --extern sha1=/usr/local/src/remacs/rust_src/target/debug/deps/libsha1-6498049ba457dec1.rlib --extern sha2=/usr/local/src/remacs/rust_src/target/debug/deps/libsha2-5f53cb41632fb8ce.rlib --extern systemstat=/usr/local/src/remacs/rust_src/target/debug/deps/libsystemstat-7dc0d104a0ed5c4d.rlib (exit code: 1) cargo --verbose build 124.46s user 7.97s system 543% cpu 24.375 total 101 vladimir@prokofiev /usr/local/src/remacs/rust_src (git)-[master] % po /usr/local/src/remacs /usr/local/src/elegant-emacs ~ `

    I noticed that earlier I got:

    Running/usr/local/src/remacs/rust_src/remacs-bindings/target/release/remacs-bindings bindings ../rust_src/generated/bindings.rsRustfmt failed at stdin:169: line exceeded maximum length (maximum: 100, found: 221) (sorry) Rustfmt failed at stdin:2921: line exceeded maximum length (maximum: 100, found: 364) (sorry) Rustfmt failed at stdin:10115: line exceeded maximum length (maximum: 100, found: 250) (sorry) Rustfmt failed at stdin:10126: line exceeded maximum length (maximum: 100, found: 307) (sorry) Rustfmt failed at stdin:10127: line exceeded maximum length (maximum: 100, found: 307) (sorry) Rustfmt failed at stdin:10128: line exceeded maximum length (maximum: 100, found: 303) (sorry) Rustfmt failed at stdin:10129: line exceeded maximum length (maximum: 100, found: 303) (sorry) Rustfmt failed at stdin:15033: line exceeded maximum length (maximum: 100, found: 145) (sorry) Rustfmt failed at stdin:15211: line exceeded maximum length (maximum: 100, found: 175) (sorry) Rustfmt failed at stdin:15223: line exceeded maximum length (maximum: 100, found: 143) (sorry) Rustfmt failed at stdin:15231: line exceeded maximum length (maximum: 100, found: 145) (sorry) Rustfmt failed at stdin:15949: line exceeded maximum length (maximum: 100, found: 1808) (sorry) Rustfmt failed at stdin:16579: line exceeded maximum length (maximum: 100, found: 203) (sorry) Rustfmt failed at stdin:16650: line exceeded maximum length (maximum: 100, found: 211) (sorry) Rustfmt failed at stdin:16798: line exceeded maximum length (maximum: 100, found: 115) (sorry) Rustfmt failed at stdin:16830: line exceeded maximum length (maximum: 100, found: 115) (sorry) Rustfmt failed at stdin:16996: line exceeded maximum length (maximum: 100, found: 116) (sorry) Rustfmt failed at stdin:17061: line exceeded maximum length (maximum: 100, found: 115) (sorry) Rustfmt failed at stdin:18639: line exceeded maximum length (maximum: 100, found: 267) (sorry) Rustfmt failed at stdin:20190: line exceeded maximum length (maximum: 100, found: 220) (sorry) Rustfmt failed at stdin:20679: line exceeded maximum length (maximum: 100, found: 145) (sorry) Rustfmt failed at stdin:22864: line exceeded maximum length (maximum: 100, found: 4671) (sorry) Rustfmt failed at stdin:23098: line exceeded maximum length (maximum: 100, found: 4777) (sorry) Rustfmt failed at stdin:28590: line exceeded maximum length (maximum: 100, found: 3922) (sorry) Rustfmt failed at stdin:36091: line exceeded maximum length (maximum: 100, found: 257) (sorry) Rustfmt failed at stdin:36537: line exceeded maximum length (maximum: 100, found: 170) (sorry) Rustfmt failed at stdin:36649: line exceeded maximum length (maximum: 100, found: 173) (sorry) Rustfmt failed at stdin:36948: line exceeded maximum length (maximum: 100, found: 164) (sorry) Rustfmt failed at stdin:40075: line exceeded maximum length (maximum: 100, found: 331) (sorry) Rustfmt failed at stdin:43701: line exceeded maximum length (maximum: 100, found: 146) (sorry) Rustfmt failed at stdin:43709: line exceeded maximum length (maximum: 100, found: 145) (sorry) Rustfmt failed at stdin:43717: line exceeded maximum length (maximum: 100, found: 148) (sorry) Rustfmt failed at stdin:43745: line exceeded maximum length (maximum: 100, found: 146) (sorry) Rustfmt failed at stdin:43773: line exceeded maximum length (maximum: 100, found: 146) (sorry) Rustfmt failed at stdin:45279: line exceeded maximum length (maximum: 100, found: 3943) (sorry) Rustfmt failed at stdin:47580: line exceeded maximum length (maximum: 100, found: 4902) (sorry) Rustfmt failed at stdin:47583: line exceeded maximum length (maximum: 100, found: 228) (sorry) Rustfmt failed at stdin:49810: line exceeded maximum length (maximum: 100, found: 222) (sorry) Rustfmt failed at stdin:52031: line exceeded maximum length (maximum: 100, found: 165) (sorry) Rustfmt failed at stdin:54310: line exceeded maximum length (maximum: 100, found: 172) (sorry) Rustfmt failed at stdin:54345: line exceeded maximum length (maximum: 100, found: 213) (sorry) Rustfmt failed at stdin:58278: line exceeded maximum length (maximum: 100, found: 148) (sorry) Rustfmt failed at stdin:59680: line exceeded maximum length (maximum: 100, found: 151) (sorry) Rustfmt failed at stdin:59780: line exceeded maximum length (maximum: 100, found: 155) (sorry) Rustfmt failed at stdin:61824: line exceeded maximum length (maximum: 100, found: 156) (sorry) Rustfmt failed at stdin:62080: line exceeded maximum length (maximum: 100, found: 243) (sorry) Rustfmt failed at stdin:62081: line exceeded maximum length (maximum: 100, found: 247) (sorry) Rustfmt failed at stdin:62082: line exceeded maximum length (maximum: 100, found: 333) (sorry) Rustfmt failed at stdin:62083: line exceeded maximum length (maximum: 100, found: 333) (sorry) Rustfmt failed at stdin:62101: line exceeded maximum length (maximum: 100, found: 149) (sorry) Rustfmt failed at stdin:62109: line exceeded maximum length (maximum: 100, found: 145) (sorry) Rustfmt failed at stdin:62676: line exceeded maximum length (maximum: 100, found: 289) (sorry) Rustfmt failed at stdin:63045: line exceeded maximum length (maximum: 100, found: 162) (sorry) Rustfmt failed at stdin:68193: line exceeded maximum length (maximum: 100, found: 1352) (sorry) Rustfmt failed at stdin:68850: line exceeded maximum length (maximum: 100, found: 1071) (sorry) Rustfmt failed at stdin:71005: line exceeded maximum length (maximum: 100, found: 384) (sorry) Rustfmt failed at stdin:73748: line exceeded maximum length (maximum: 100, found: 2410) (sorry) Rustfmt failed at stdin:74016: line exceeded maximum length (maximum: 100, found: 149) (sorry) Rustfmt failed at stdin:74904: line exceeded maximum length (maximum: 100, found: 947) (sorry) Rustfmt failed at stdin:75153: line exceeded maximum length (maximum: 100, found: 301) (sorry) Rustfmt failed at stdin:77128: line exceeded maximum length (maximum: 100, found: 1277) (sorry) Rustfmt failed at stdin:77543: line exceeded maximum length (maximum: 100, found: 114) (sorry) Rustfmt failed at stdin:81331: line exceeded maximum length (maximum: 100, found: 2504) (sorry) Rustfmt failed at stdin:81725: line exceeded maximum length (maximum: 100, found: 3853) (sorry) Rustfmt failed at stdin:82138: line exceeded maximum length (maximum: 100, found: 1080) (sorry) Rustfmt failed at stdin:82323: line exceeded maximum length (maximum: 100, found: 2302) (sorry) Rustfmt failed at stdin:82670: line exceeded maximum length (maximum: 100, found: 544) (sorry) Rustfmt failed at stdin:83549: line exceeded maximum length (maximum: 100, found: 1100) (sorry) Rustfmt failed at stdin:83747: line exceeded maximum length (maximum: 100, found: 3785) (sorry) Rustfmt failed at stdin:85864: line exceeded maximum length (maximum: 100, found: 1257) (sorry) Rustfmt failed at stdin:87200: line exceeded maximum length (maximum: 100, found: 887) (sorry) Rustfmt failed at stdin:88250: line exceeded maximum length (maximum: 100, found: 763) (sorry) Rustfmt failed at stdin:88333: line exceeded maximum length (maximum: 100, found: 1340) (sorry) Rustfmt failed at stdin:88495: line exceeded maximum length (maximum: 100, found: 716) (sorry) Rustfmt failed at stdin:88866: line exceeded maximum length (maximum: 100, found: 327) (sorry) Rustfmt failed at stdin:88976: line exceeded maximum length (maximum: 100, found: 489) (sorry) Rustfmt failed at stdin:89239: line exceeded maximum length (maximum: 100, found: 4646) (sorry) Rustfmt failed at stdin:89630: line exceeded maximum length (maximum: 100, found: 2076) (sorry) Rustfmt failed at stdin:90165: line exceeded maximum length (maximum: 100, found: 20837) (sorry) Rustfmt failed at stdin:92028: line exceeded maximum length (maximum: 100, found: 1865) (sorry) Rustfmt failed at stdin:92601: line exceeded maximum length (maximum: 100, found: 1615) (sorry) Rustfmt failed at stdin:93064: line exceeded maximum length (maximum: 100, found: 2036) (sorry) Rustfmt failed at stdin:93383: line exceeded maximum length (maximum: 100, found: 434) (sorry) Rustfmt failed at stdin:93509: line exceeded maximum length (maximum: 100, found: 2080) (sorry) Rustfmt failed at stdin:93970: line exceeded maximum length (maximum: 100, found: 503) (sorry) Rustfmt failed at stdin:94720: line exceeded maximum length (maximum: 100, found: 753) (sorry) Rustfmt failed at stdin:94954: line exceeded maximum length (maximum: 100, found: 229) (sorry) Rustfmt failed at stdin:95200: line exceeded maximum length (maximum: 100, found: 1307) (sorry) Rustfmt failed at stdin:95692: line exceeded maximum length (maximum: 100, found: 4365) (sorry) Rustfmt failed at stdin:96088: line exceeded maximum length (maximum: 100, found: 1825) (sorry) Rustfmt failed at stdin:96428: line exceeded maximum length (maximum: 100, found: 3215) (sorry) Rustfmt failed at stdin:96735: line exceeded maximum length (maximum: 100, found: 261) (sorry) Rustfmt failed at stdin:96873: line exceeded maximum length (maximum: 100, found: 865) (sorry) Rustfmt failed at stdin:97160: line exceeded maximum length (maximum: 100, found: 1226) (sorry) Rustfmt failed at stdin:97296: line exceeded maximum length (maximum: 100, found: 694) (sorry) Rustfmt failed at stdin:97381: line exceeded maximum length (maximum: 100, found: 962) (sorry) Rustfmt failed at stdin:97530: line exceeded maximum length (maximum: 100, found: 859) (sorry) Rustfmt failed at stdin:97750: line exceeded maximum length (maximum: 100, found: 693) (sorry) Rustfmt failed at stdin:98078: line exceeded maximum length (maximum: 100, found: 496) (sorry) Rustfmt failed at stdin:98184: line exceeded maximum length (maximum: 100, found: 3523) (sorry) Rustfmt failed at stdin:98845: line exceeded maximum length (maximum: 100, found: 650) (sorry) Rustfmt failed at stdin:100364: line exceeded maximum length (maximum: 100, found: 498) (sorry) Rustfmt failed at stdin:100624: line exceeded maximum length (maximum: 100, found: 1166) (sorry) Rustfmt failed at stdin:101935: line exceeded maximum length (maximum: 100, found: 1037) (sorry) Rustfmt failed at stdin:102248: line exceeded maximum length (maximum: 100, found: 1121) (sorry) Rustfmt failed at stdin:102425: line exceeded maximum length (maximum: 100, found: 231) (sorry) Rustfmt failed at stdin:102540: line exceeded maximum length (maximum: 100, found: 3795) (sorry) Rustfmt failed at stdin:102873: line exceeded maximum length (maximum: 100, found: 1622) (sorry) Rustfmt failed at stdin:103062: line exceeded maximum length (maximum: 100, found: 553) (sorry) Rustfmt failed at stdin:103226: line exceeded maximum length (maximum: 100, found: 2415) (sorry) Rustfmt failed at stdin:103411: line exceeded maximum length (maximum: 100, found: 3122) (sorry) Rustfmt failed at stdin:107454: line exceeded maximum length (maximum: 100, found: 868) (sorry) Rustfmt failed at stdin:107729: line exceeded maximum length (maximum: 100, found: 1255) (sorry) Rustfmt failed at stdin:109342: line exceeded maximum length (maximum: 100, found: 1260) (sorry) Rustfmt failed at stdin:110005: line exceeded maximum length (maximum: 100, found: 643) (sorry) Rustfmt failed at stdin:111027: line exceeded maximum length (maximum: 100, found: 2257) (sorry) Rustfmt failed at stdin:121175: line exceeded maximum length (maximum: 100, found: 583) (sorry) Rustfmt failed at stdin:121994: line exceeded maximum length (maximum: 100, found: 3511) (sorry) Rustfmt failed at stdin:122240: line exceeded maximum length (maximum: 100, found: 198) (sorry) Rustfmt failed at stdin:122636: line exceeded maximum length (maximum: 100, found: 870) (sorry) Rustfmt failed at stdin:122832: line exceeded maximum length (maximum: 100, found: 2741) (sorry) Rustfmt failed at stdin:123096: line exceeded maximum length (maximum: 100, found: 1188) (sorry) Rustfmt failed at stdin:123389: line exceeded maximum length (maximum: 100, found: 4503) (sorry) Rustfmt failed at stdin:123790: line exceeded maximum length (maximum: 100, found: 1125) (sorry) Rustfmt failed at stdin:124366: line exceeded maximum length (maximum: 100, found: 778) (sorry) Rustfmt failed at stdin:125124: line exceeded maximum length (maximum: 100, found: 1092) (sorry) Rustfmt failed at stdin:125437: line exceeded maximum length (maximum: 100, found: 741) (sorry) Rustfmt failed at stdin:125551: line exceeded maximum length (maximum: 100, found: 4825) (sorry) Rustfmt failed at stdin:125974: line exceeded maximum length (maximum: 100, found: 1040) (sorry) Rustfmt failed at stdin:126494: line exceeded maximum length (maximum: 100, found: 12547) (sorry) Rustfmt failed at stdin:128124: line exceeded maximum length (maximum: 100, found: 393) (sorry) Rustfmt failed at stdin:128320: line exceeded maximum length (maximum: 100, found: 2308) (sorry) Rustfmt failed at stdin:130019: line exceeded maximum length (maximum: 100, found: 1610) (sorry) Rustfmt failed at stdin:131151: line exceeded maximum length (maximum: 100, found: 568) (sorry) Rustfmt failed at stdin:131238: line exceeded maximum length (maximum: 100, found: 634) (sorry) Rustfmt failed at stdin:131485: line exceeded maximum length (maximum: 100, found: 610) (sorry) Rustfmt failed at stdin:131971: line exceeded maximum length (maximum: 100, found: 571) (sorry) Rustfmt failed at stdin:132160: line exceeded maximum length (maximum: 100, found: 3172) (sorry) Rustfmt failed at stdin:132614: line exceeded maximum length (maximum: 100, found: 439) (sorry) Rustfmt failed at stdin:132743: line exceeded maximum length (maximum: 100, found: 3017) (sorry) Rustfmt failed at stdin:133073: line exceeded maximum length (maximum: 100, found: 1107) (sorry) Rustfmt failed at stdin:133237: line exceeded maximum length (maximum: 100, found: 4608) (sorry) Rustfmt failed at stdin:135651: line exceeded maximum length (maximum: 100, found: 1537) (sorry) Rustfmt failed at stdin:135844: line exceeded maximum length (maximum: 100, found: 2676) (sorry) Rustfmt failed at stdin:136848: line exceeded maximum length (maximum: 100, found: 1082) (sorry) Rustfmt failed at stdin:137328: line exceeded maximum length (maximum: 100, found: 2188) (sorry) Rustfmt failed at stdin:137826: line exceeded maximum length (maximum: 100, found: 2900) (sorry) Rustfmt failed at stdin:138575: line exceeded maximum length (maximum: 100, found: 554) (sorry) Rustfmt failed at stdin:138821: line exceeded maximum length (maximum: 100, found: 265) (sorry) Rustfmt failed at stdin:139136: line exceeded maximum length (maximum: 100, found: 525) (sorry) Rustfmt failed at stdin:140033: line exceeded maximum length (maximum: 100, found: 185) (sorry) Rustfmt failed at stdin:140269: line exceeded maximum length (maximum: 100, found: 856) (sorry) Rustfmt failed at stdin:140508: line exceeded maximum length (maximum: 100, found: 1876) (sorry) Rustfmt failed at stdin:140977: line exceeded maximum length (maximum: 100, found: 1130) (sorry) Rustfmt failed at stdin:141332: line exceeded maximum length (maximum: 100, found: 1200) (sorry) Rustfmt failed at stdin:141511: line exceeded maximum length (maximum: 100, found: 1455) (sorry) Rustfmt failed at stdin:141727: line exceeded maximum length (maximum: 100, found: 566) (sorry) Rustfmt failed at stdin:141856: line exceeded maximum length (maximum: 100, found: 853) (sorry) Rustfmt failed at stdin:142585: line exceeded maximum length (maximum: 100, found: 546) (sorry) Rustfmt failed at stdin:143028: line exceeded maximum length (maximum: 100, found: 529) (sorry) Rustfmt failed at stdin:143156: line exceeded maximum length (maximum: 100, found: 1388) (sorry) Rustfmt failed at stdin:143408: line exceeded maximum length (maximum: 100, found: 645) (sorry) Rustfmt failed at stdin:143862: line exceeded maximum length (maximum: 100, found: 730) (sorry) Rustfmt failed at stdin:146480: line exceeded maximum length (maximum: 100, found: 1372) (sorry) Rustfmt failed at stdin:147022: line exceeded maximum length (maximum: 100, found: 1113) (sorry) Rustfmt failed at stdin:148809: line exceeded maximum length (maximum: 100, found: 641) (sorry) Rustfmt failed at stdin:149780: line exceeded maximum length (maximum: 100, found: 1366) (sorry) Rustfmt failed at stdin:152486: line exceeded maximum length (maximum: 100, found: 620) (sorry) Rustfmt failed at stdin:153349: line exceeded maximum length (maximum: 100, found: 2457) (sorry) Rustfmt failed at stdin:153908: line exceeded maximum length (maximum: 100, found: 880) (sorry) Rustfmt failed at stdin:155158: line exceeded maximum length (maximum: 100, found: 1437) (sorry) Rustfmt failed at stdin:155387: line exceeded maximum length (maximum: 100, found: 2496) (sorry) Rustfmt failed at stdin:155909: line exceeded maximum length (maximum: 100, found: 506) (sorry) Rustfmt failed at stdin:156063: line exceeded maximum length (maximum: 100, found: 515) (sorry) Rustfmt failed at stdin:156475: line exceeded maximum length (maximum: 100, found: 1221) (sorry) Rustfmt failed at stdin:157225: line exceeded maximum length (maximum: 100, found: 1996) (sorry) Rustfmt failed at stdin:158691: line exceeded maximum length (maximum: 100, found: 766) (sorry) Rustfmt failed at stdin:160174: line exceeded maximum length (maximum: 100, found: 1000) (sorry) Rustfmt failed at stdin:161274: line exceeded maximum length (maximum: 100, found: 2300) (sorry) Rustfmt failed at stdin:161909: line exceeded maximum length (maximum: 100, found: 2302) (sorry) Rustfmt failed at stdin:162433: line exceeded maximum length (maximum: 100, found: 842) (sorry) Rustfmt failed at stdin:162967: line exceeded maximum length (maximum: 100, found: 1222) (sorry) Rustfmt failed at stdin:163182: line exceeded maximum length (maximum: 100, found: 579) (sorry) Rustfmt failed at stdin:163260: line exceeded maximum length (maximum: 100, found: 467) (sorry) Rustfmt failed at stdin:165271: line exceeded maximum length (maximum: 100, found: 380) (sorry) Rustfmt failed at stdin:165465: line exceeded maximum length (maximum: 100, found: 545) (sorry) Rustfmt failed at stdin:166069: line exceeded maximum length (maximum: 100, found: 507) (sorry) Rustfmt failed at stdin:166781: line exceeded maximum length (maximum: 100, found: 656) (sorry) Rustfmt failed at stdin:168629: line exceeded maximum length (maximum: 100, found: 1462) (sorry) Rustfmt failed at stdin:169062: line exceeded maximum length (maximum: 100, found: 8027) (sorry) Rustfmt failed at stdin:170420: line exceeded maximum length (maximum: 100, found: 3579) (sorry)

    which might not be an issue, but since it involved bindings.rs, I thought I should mention it.

    opened by vgivanovic 0
  • Port string

    Port string

    DEFUN ("string", Fstring, Sstring, 0, MANY, 0,
           doc: /*
    Concatenate all the argument characters and make the result a string.
    usage: (string &rest CHARACTERS)  */)
      (ptrdiff_t n, Lisp_Object *args)
    {
      ptrdiff_t i;
      int c;
      unsigned char *buf, *p;
      Lisp_Object str;
      USE_SAFE_ALLOCA;
    
      SAFE_NALLOCA (buf, MAX_MULTIBYTE_LENGTH, n);
      p = buf;
    
      for (i = 0; i < n; i++)
        {
          CHECK_CHARACTER (args[i]);
          c = XINT (args[i]);
          p += CHAR_STRING (c, p);
        }
    
      str = make_string_from_bytes ((char *) buf, n, p - buf);
      SAFE_FREE ();
      return str;
    }
    
    opened by A6GibKm 2
  • Correct listed build requirements in readme

    Correct listed build requirements in readme

    Clang is required, so it should be stated as such.

    Building remacs fails due to:

    thread 'main' panicked at 'Unable to find libclang: "couldn\'t find any valid shared libraries matching: [\'libclang.so\', \'libclang-*.so\', \'libclang.so.*\'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"', /home/valley/.cargo/registry/src/github.com-1ecc6299db9ec823/bindgen-0.46.0/src/lib.rs:1652:31
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    
    opened by Phate6660 2
Owner
Remacs
Rust <3 Emacs
Remacs
A terminal-based text editor written in Rust

Iota Iota is a terminal-based text-editor written in Rust. Here's what it looks like right now, editing itself. Motivation Iota was born out of my fru

Greg Chapple 1.6k Jan 8, 2023
A text editor in ≤1024 lines of code, written in Rust

Kibi: A text editor in ≤1024 lines of code, written in Rust A configurable text editor with UTF-8 support, incremental search, syntax highlighting, li

Ilaï Deutel 881 Dec 29, 2022
An independent Rust text editor that runs in your terminal!

Ox editor Ox is a code editor that runs in your terminal. About The Project Ox is a code editor. It was written in Rust using ANSI escape sequences. I

null 2.9k Jan 2, 2023
A modern editor with a backend written in Rust.

Xi Editor (pronounced "Zigh") A modern editor with a backend written in Rust. Maintenance status: The xi-editor project is not currently under active

null 19.7k Jan 5, 2023
Web base text editor written in rust

Ultron Ultron is a web based monospace text-editor with syntax highlighting, completely written in rust. I wrote this code editor for my very specific

Jovansonlee Cesar 59 Aug 8, 2022
syntect is a syntax highlighting library for Rust that uses Sublime Text syntax definitions.

syntect is a syntax highlighting library for Rust that uses Sublime Text syntax definitions. It aims to be a good solution for any Rust project that needs syntax highlighting, including deep integration with text editors written in Rust.

Tristan Hume 1.5k Jan 8, 2023
A fast and small Rust library to make Electron apps more secure.

electron-hardener A Rust library and command line tool to harden Electron binaries against runtime behavior modifications. This provides a way to hard

1Password 364 Dec 23, 2022
Rust-based traffic editor for RMF

Traffic Editor III Welcome to Traffic Editor III. install stuff Unfortunately we need a newer Rust than what comes with Ubuntu 20.04. First make sure

null 2 Oct 20, 2022
My own personal code editor built with Rust + OpenGL

Glyph This is my personal code editor that I am building for fun and to get more familiar with OpenGL. Glyph currently supports Vim keybinds, syntax h

Zack Radisic 83 Dec 23, 2022
Lightning-fast and Powerful Code Editor written in Rust

Lapce Lightning-fast and Powerful Code Editor written in Rust About Lapce is written in pure Rust, with UI in Druid. It's using Xi-Editor's Rope Scien

Lapce 22.1k Jan 8, 2023
A simple terminal-based editor made in rust!

ELuna Editor The terminal-based editor for europa lang. Goals Be as minimal as possible, but retain conveniences found in other editors. Do not add fe

Junhao 3 May 25, 2022
Ginkgo is a text editor built entirely in Rust

Ginkgo is a text editor built entirely in Rust. It supports cursor movements, CTRL commands, select vim commands, insert vs. normal modes, and more. Ginkgo is based on my text editor JED, which itself was based on the popular online editor Kilo.

James Asbury 12 Oct 15, 2022
Linting your Rust-files in Atom, using rustc and cargo.

linter-rust Linting your Rust-files in Atom, using rustc and cargo. Files will be checked when you open or save them. Installation Install Rust and/or

Atom Linter 42 Sep 28, 2022
a shiny test framework for rust

Ooh, shiny! Shiny makes you less distracted with copying over initialization code in test cases. It also has a fancy syntax similar to Ruby's RSpec or

Vladimir Pouzanov 95 Apr 8, 2022
Dip editor: Multi-platform Text editor purely written in Rust

dip editor Multi-platform Text editor purely written in Rust, supercharged by Bevy game engine and Dioxus UI framework. heavily in development Why Gam

Junichi Sugiura 270 Jan 4, 2023
A collision editor for Guilty Gear -Strive-, written in Rust

ggst_collision_editor_rs A collision editor for Guilty Gear -Strive- and other Team Red Arc System Works games, written in Rust. Uses a customized ver

null 4 May 3, 2022
Wealthy Rich ported to Rust! This aims to be a crate for rich text and beautiful formatting in the terminal

Wealthy Rich ported to Rust! This aims to be a crate for rich text and beautiful formatting in the terminal

Sourajyoti Basak 20 Dec 29, 2022
Helix - A kakoune / neovim inspired editor, written in Rust

A kakoune / neovim inspired editor, written in Rust. The editing model is very heavily based on kakoune; during development I found myself agree

null 17.9k Jan 10, 2023
A pathtracer written in rust - runs in the web and includes an editor

Webtracer A pathtracer written in rust - runs in the web and includes an editor Rendering is parallelized and utilizes all cpu cores You can easily ed

Shapur 5 Oct 7, 2022