Neomacs:用 Rust 重写 Emacs ——目标 GPU 渲染引擎、多线程 Elisp、10 倍 Lisp 性能

自由软件要支持,期待主要目标实现的那天

doom 这些使用没有什么限制吧?

编译运行很顺滑,字体感觉雾蒙蒙的

左边Neomacs,右边原生emacs 31.0.5

系统环境是

Operating System: Manjaro Linux 
KDE Plasma Version: 6.5.5
KDE Frameworks Version: 6.23.0
Qt Version: 6.10.2
Kernel Version: 6.12.73-1-MANJARO (64-bit)
Graphics Platform: Wayland

1 个赞

太棒了,希望能早日实现目标!

致敬!

1 个赞

Fmacs挺好,或者NEmacs?话说有没有编译好的macOS包尝尝鲜?

1 个赞

要是有Windows 编译好的包也推荐一下啊

GNU有个编辑器叫nano,你就叫它的反义词吧。你比emax还要max☝️

感觉zmacs也不错。。。。如果真做成了,应该是最终版本了

现有的 Emacs 配置和插件包依然可以正常使用。

意思是将.emacs.d目录拷贝过去后,直接能支持吗?准备下载试玩一下 :grinning_face:

想到的需求如下:

  1. 比起性能,自己更关心扩展性和高度的定制,希望Neomacs能兼容稳定性与可扩展性,比如:不包含.emacs.d目录,就是类似于umacs那种小而美的稳定版本,包含.emacs.d目录,就跟emacs一样,玩家能高度定义自己的玩法。
  2. 多版本支持,比如:TUI、服务器|笔记本|安卓|苹果|aarch64主板都能跑,服务器端可以用来做开发,本地端可以用来做文件管理打造工作流,aarch64主板端可以做用调试IDE窗口
  3. AI融合(畅想一下 :grinning_face:),neomacs不再区分TUI和GUI,日常就是TUI模式,进行多个ai工作流的管理,但支持一键查看图片和视频,由于底层支持GPU,是否可以实现图片级适配级的(纯键盘操作)? 不是类似vim那种弹标记,而是将对视频图片的操作变成一个个命令库,能够绑定快捷键。
  4. 自进化,要能支持ai agent,它能实现我需要的玩法,并且包含调试的功能,相当于在编辑器基础上高度个人化IDE定制。
  5. 支持conda/docker,解决依赖和部署困难的问题,玩eaf的时候,遇到windows平台依赖项过多,导致自己无法部署,在ubuntu平台,仍然遇到环境差异引起的依赖项多、软件并没有想象的好用(比如:内置的chrome版本低 eaf-git也没预想中的好用 创建的面板似乎是写死的,像一个简易的TUI菜单) 或者说既不够开箱即用,也不够有扩展性(简单吐槽一下,其实是我还没用顺手eaf :grin:)

最新的代码在macOS中编译报错:

cargo build --release --manifest-path rust/neomacs-display/Cargo.toml \
  --no-default-features --features "neo-term"
./configure --with-neomacs --with-neovm-core-backend=emacs-c
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C ../lib/ all
make[3]: Nothing to be done for `all'.
  CC       dispnew.o
In file included from dispnew.c:28:
In file included from ./termchar.h:23:
./dispextern.h:3585:35: error: unknown type name 'Emacs_Pix_Context'
 3585 |                                   Emacs_Pix_Context img);
      |                                   ^
./dispextern.h:3587:35: error: unknown type name 'Emacs_Pix_Context'
 3587 |                                   Emacs_Pix_Context mask);
      |                                   ^
dispnew.c:3858:2: warning: unused label 'set_cursor' [-Wunused-label]
 3858 |  set_cursor:
      |  ^~~~~~~~~~~
dispnew.c:4609:10: error: use of undeclared identifier 'QCid'
 4609 |                        QCid, make_fixnum (it.webkit_id),
      |                        ^
dispnew.c:4609:10: error: use of undeclared identifier 'QCid'
dispnew.c:4609:10: error: use of undeclared identifier 'QCid'
1 warning and 5 errors generated.
make[2]: *** [dispnew.o] Error 1
make[1]: *** [src] Error 2
***
*** "make all" failed with exit status 2.
***
*** You could try to:
*** - run "make bootstrap", which might fix the problem
*** - run "make V=1", which displays the full commands invoked by make,
***   to further investigate the problem
***
make[1]: *** [advice-on-failure] Error 2
make: *** [all] Error 2

如果mac能打个dmg的包就好了,估计想尝试的会非常多

2 个赞

试试 --with-native-compination=no 呢,会成功吗

make报错,

./configure --with-neomacs --with-neovm-core-backend=emacs-c --with-native-compination=no

如图

用这个编译选项就不会报kqueue.c的编译报错。但是和原因的报错一样了。

./configure --with-neomacs --with-neovm-core-backend=emacs-c --with-file-notification=no --with-native-compination=no

咱们上 github 继续讨论吧:Does it support MacOS? · Issue #22 · eval-exec/neomacs · GitHub 另外试试加上 --without-ns 能 成功吗

佩服大佬的实践精神,不过不知大佬的这个底层设计与Zed的高性能框架可否一战。随着 wasm 3.0 的到来,尤其是它对 GC 的支持,未来如果能将 Lisp/Scheme 解释器引入其中,在 Zed 中重铸 Emacs 的生态,也未尝不是一个选择。不管是用Lisp为Zed重塑Emacs的灵魂,还是让Emacs借Rust与GPU渲染引擎焕发新生,都是一件好事。

1 个赞

zed不支持不同大小的字体在同一个buffer里面吧?

使用 wsl + archlinux + home-manager 编译倒是通过了, 但是没法启动

我的问题,没安装mesa