New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Webrender graphic backend (GPU-accelerated Emacs) #1581
base: master
Are you sure you want to change the base?
Conversation
Wow! I tried it and I was able to type and eval elisp ;) |
How much effort would it be to put the needed code for this PR on top of current emacs master ? |
@brotzeit It has been rebased against master branch 😄 |
I mean emacs not remacs :P |
@brotzeit I think it will not be very hard to port those code on GUN Emacs master with a official stable rust bindings. |
gccemacs has become so popular for those running experimental emacs builds, my sense is it's much easier to port gpu-emacs => emacs than it would be to port gccemacs => remacs, and you would get a larger market share of people willing to run bleeding edge. Thanks for your contributions to emacs ecosystem! |
Hey @harryfei, this looks awesome. hope this isn't too much noise for your PR. Let me know, if you prefer that I open an issue on your fork. I git cloned and tried to build your branch and got the following runtime panic. autogen and ./configure --with-webrender work fine, but I get the following stack trace when I try to run it. System version
~/remacs $ RUST_BACKTRACE=full src/remacs -q
libEGL warning: DRI2: failed to authenticate
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: CreationErrors([NoAvailablePixelFormat, OsError("Couldn\'t find any available vsync extension")])', src/webrender_backend/output.rs:109:34
stack backtrace:
0: 0xa42fd4 - backtrace::backtrace::libunwind::trace::hcdd38e03c5c0ae1d
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
1: 0xa42fd4 - backtrace::backtrace::trace_unsynchronized::he5bd7c616dadfd7d
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
2: 0xa42fd4 - std::sys_common::backtrace::_print_fmt::h5c76d4ca71f55821
at src/libstd/sys_common/backtrace.rs:78
3: 0xa42fd4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h2c8c63d62d7bea1c
at src/libstd/sys_common/backtrace.rs:59
4: 0xa77d3c - core::fmt::write::h97d981a565c87982
at src/libcore/fmt/mod.rs:1069
5: 0xa34a63 - std::io::Write::write_fmt::h76b54795ca4d1941
at src/libstd/io/mod.rs:1439
6: 0xa47fd5 - std::sys_common::backtrace::_print::h93fb2909159290d7
at src/libstd/sys_common/backtrace.rs:62
7: 0xa47fd5 - std::sys_common::backtrace::print::ha755c3134746c2d0
at src/libstd/sys_common/backtrace.rs:49
8: 0xa47fd5 - std::panicking::default_hook::{{closure}}::h3a7ab24b109d5437
at src/libstd/panicking.rs:198
9: 0xa47d12 - std::panicking::default_hook::h2aa3c18a39936382
at src/libstd/panicking.rs:218
10: 0xa48682 - std::panicking::rust_panic_with_hook::h5035e60b675c5c99
at src/libstd/panicking.rs:511
11: 0xa4826b - rust_begin_unwind
at src/libstd/panicking.rs:419
12: 0xa749d1 - core::panicking::panic_fmt::h7fe09dc6d8aa54c4
at src/libcore/panicking.rs:111
13: 0xa74643 - core::option::expect_none_failed::h294957c8cca982d9
at src/libcore/option.rs:1268
14: 0x5f4798 - remacs::webrender_backend::output::Output::create_webrender_window::{{closure}}::h03c4002bafdc94f6
15: 0x5e149c - std::sys_common::backtrace::__rust_begin_short_backtrace::hbe3ef94937165d3d
Fatal error 6: Aborted
Backtrace:
/home/petr_tik/remacs/src/remacs[0x4ccde7]
/home/petr_tik/remacs/src/remacs[0x4cceb9]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x128a0)[0x7f94b3a9f8a0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f94b2b0ef47]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f94b2b108b1]
/home/petr_tik/remacs/src/remacs[0xa59c27]
aborted (core dumped) I am not too proficient with servo/webrender or GUI programming tbh. If you are willing and able, I am happy to be a guinea pig for you to test it on more HW. P.S.
I agree with the suggestion to rebase this PR on top of the feature/native-comp branch to allow people to try the very bleeding edge. After all, people who want to build their own remacs from source are pretty keen on the bleeding edge. |
@petr-tik The crash issue related to rust-windowing/glutin#1262 |
Hi I wanted to try this but I cloned the fork and built from there. Is that how I was supposed to do it ? |
@dirodriguezm The code is on webrender branch. :) |
I have merged this PR into https://github.com/emacs-ng/emacs-ng. |
This webrender experimental integration can support basic editing work 😄 .
Currently, it can only be built on Linux platform(X11 and Wayland).
Build steps:
Screenshot(my doom emacs configuration)