Lapce – Fast open-source code editor
lapce.dev
lapce.dev
I'm aware that Lapce lacks lots of basic stuff. It's a personal project so the initial set of features and key bindings are tight to my personal preferences.
I'm currently working on the missing pieces, like multi cursor support(in master but not released yet), mouse support, sane default key bindings(probably I'll stick to an existing editor), basic UX etc.
Feel free to submit a feature request or bug report in Github Issues or leave your feedback here.
> I'm currently working on the missing pieces, like multi cursor support(in master but not released yet), mouse support, sane default key bindings(probably I'll stick to an existing editor), basic UX etc.
Website claims "Native GUI" but this is not native GUI. I'd rather have basic UX before multi cursor or anything else nice to have but totally optional things. On Windows open dialog is broken, you can't select drives, you have to enter the drive letter manually, but in input field delete key is not working. That's as far as I got trying it out.
It will, it's in the DNA. L comes before P.
> " L comes before P."
?
I.e. Lightning-fast comes before Powerful.
slainte!
I think the heat you're getting here is from the very slick website that makes Lapce look more finished than it is. It might be a good idea to adjust the text to manage people's expectations.
Great job!
Anyway, development-wise these are minor issues in a project of this size. Nice work!
Yeah, unfortunately it seems like there's a (possibly recently introduced?) bug that appears to break arrow-key/list interactions.
I was able to get code completion & command palettes to work by supplying a custom keymap I posted here: https://github.com/lapce/lapce/issues/133#issuecomment-10715...
My impression is that the non-modal keymap isn't as regularly updated given the developer's preference for modal interaction. I'm happy enough I can at least still edit the keymap to workaround the issue. :D
is EOL and should be treated as such.
Windows 7 EOL was 2 years ago though. (I know it's the last version of Windows that isn't an add-bloated spyware but still)
https://www.microsoft.com/en-US/windows/windows-7-end-of-lif...
https://docs.flatpak.org/en/latest/introduction.html#reasons...
> Flathub only hosts stable application releases, and not development snapshots.
from https://github.com/flathub/flathub/wiki/App-Submission
> If there’s an app that you'd like to be distributed on Flathub, the best first course of action is to approach the app’s developers and ask them to submit it. Remember that for some projects or communities, this may be the first that they have heard of the Flatpak technology or interacted with somebody who advocates it.
Also from the above link.
A Flatpak may have to ship with an independent copy of a lot of basic developer tools, and even then I don't know whether I want two different versions of git access the same local repository with a chance of incompatible repository formats.
FWIW I was recently able to get a "passable" but not ideal Rust/LSP/Rust-Analyzer/Cargo setup mostly functional via use of the kate build plugin and e.g `flatpak-spawn --host cargo build`...
...and... `flatpak-spawn --host cargo run | sed --unbuffered 's/\x1b\[[0-9;]*m//g'`.
Excuse the cough. :D (It was necessary to remove the ANSI colour codes produced by some logging library the project used.)
(My preference would be to use AppImage but unfortunately recent Kate AppImage versions have a hang-on exit bug.)
Anything like this that progresses the cross-platform remote model that we now have with VSC, particularly if the endpoint is fast and memory-efficient, is really important, because of the variety of dev environments.
What I would _really_ like, of course, is an iPad editor that could do the same.
If you could make an iPad editor that has VSC-style remoting, that is genuinely a killer app right now for a lot of people.
That would be "just enough" editor for me so I could travel for a few days and still do a couple of hours of work here and there, without the laptop commitment.
I am not big on iOS subscription apps and I'm budget-constrained, but I'd pay $50 per year (probably more, and I figure I wouldn't be alone), without hesitation, for a fast remoting iOS editor that had 80% of the functionality of VSCode Remote and had a viable built in browser to avoid the process switch.
The code-server project definitely works for this, but something a bit more native would be amazing.
(code-server is basically the open source parts of this from what I understand, and the back-end impact is really no different at all, except needing to open a port for the web interface.)
I'm not sure whether vscode.dev will be able to connect to my own remotes yet; need to test that!
The main problem is as far as I am aware the same; the browser-side connection can drop quite easily because of the limits of iOS (you can't switch away without losing it).
That is obviously not something even a native version of Lapce would be able to totally avoid, but an iOS native app might have a few more strategies for maintaining background remote connections for a little while (SSH apps do for example).
But Visual Studio Code's remote thing really is on another level -- you can do things like run the git session remotely but with the GUI-side tools, do find and replace on the remote side; all the extensions (PHP syntax stuff etc.) install and run on the remote side as well as they do locally etc.; it's almost completely seamless.
EDIT: aha, just saw this, downthread:
> "The main problem is as far as I am aware the same; the browser-side connection can drop quite easily because of the limits of iOS (you can't switch away without losing it)."
The other way round -- an in-editor browser -- could be the better way to work. GoCoEdit does this (and it really is rather good!) as does Panic's Code Editor (formerly Coda for iOS), which is good, but not as good. And you arguably get a terminal more easily this way too, particularly where SSH keys are involved.
I don't know how people text edit without the vim keybindings. I'll never go back!
Switched to vim, and the tendonitis resolved itself in about two months. That was back around 1990.
As it should be. Well done.
I was wondering if you were learning Rust and decided that you needed a project to reinforce your learning? Or you were designing and editor and decided you should do it in Rust?
And my recent professional work was writing Rust, and I felt Rust would be really suitable for my editor.
Some things I'm really excited for: - Remote development as a first-class citizen! I use code-server a ton now, but getting away from browser jank would be nice. - In the future I wonder if something besides SSH would work for the connection. SSH doesn't handle bad connections or closing a laptop and moving very well. I use wireguard to connect to my code-server instance right now and it's pretty close to feeling like I develop locally. - Lighter and faster. Why does my laptop always have to be burning... - A more FOSS ecosystem. VS Code is "open source" but not really in practice. Some important extensions (from Microsoft) have non-foss licenses and the standard distribution is built with non-foss tidbits. There are projects like Codium that rectify these issues to some degree.
I like that this is native though. VS Code is one of the rare good electron apps but native is still nicer IMO. Will give it a try.
I don't know if it's fixed now. Previously when I was using VSCode, sometimes the "go to definition" hangs and it will freeze the whole editor, which was unacceptable. So in Lapce, nothing blocks the main thread other than your key press.
I wonder if you've considered kakoune style modal editing rather than vim? If you've not come across it, it might be worth looking at, as I think it's a better paradigm and one that I expect will go nicely with the multiple cursors you're working on.
alacritty is a Rust program that is promoted as uniquely fast, but is substantially slower than (e.g.) kitty.
Free market forces based on individual self-interest have proven to be really bad at doing that, so altruism is needed to fill the gap.
...by that logic, I prefer software written in Rust to software written in C++ or Java Script even if it's worse from a user perspective, as long as it's tolerably worse rather than just unusable.
And other hilarious jokes you can tell yourself
Load a rust program into mem, change mem, run rust program. You’ve just lost safety.
For the tech savvy crowd, we care about stuff like this because we don't need another electron app hogging memory on our systems. Personally for me "written in rust" translates to "I care about performance" and "I care about my app not hogging your system memory"
Ripgrep has completely upended my expectations (in a good way) for what modern machines are capable of. I'm all for OCD perfectionism if it means the performance I dreamed of in the 90's in finally realized.
On the contrary, the rust crate ecosystem and tooling means a lone developer can compose specialised libraries to produce a working artefact that scratches her own itch. Such productivity is the opposite of getting something working at all.
Trying to build an OSS cpp project or even worse, use an OSS Cpp library in your own project is more along the lines of "getting something working at all". Every third-party and some enterprise-internal Cpp libraries require one answers the following questions:
- how do I build the damn thing?
- how do I run the tests?
- how do I use the library? Vendor into the repo? apt install?
- what APIs does the system/library provide?
- where can I find the documentation and examples?
- how do I set up code completion?
- how do I know am using the library interface correctly?
- how do I know I didn't violate any invariants/safety guarantees?
Compare with the list of dependencies across the Cargo workspace members.
https://github.com/lapce/lapce/blob/master/lapce-core/Cargo....
https://github.com/lapce/lapce/blob/master/lapce-ui/Cargo.to...
https://github.com/lapce/lapce/blob/master/lapce-rpc/Cargo.t...
The cost of adding a new rust dependency when measured by the number of questions you need to answer beforehand is nearly constant. This means a layman can be more productive in rust.
More importantly, though: how hard is it to use a library coded in C++ from your Rust program? You have to make and maintain some sort of shim layer. Even a C library needs some such effort. For any given need, you are much less likely to find an existing and suitable Rust library already written, released, and maintained than one in some other, more widely used, language.
This is true.
However the Cargo/Rust ecosystem has one standard answer, read the associated crate docs, e.g.:
Coincidentally, the above linked crate `libloading` also shows how to access functionality in a shared library that exposes a C ABI compatible interface whatever the implementation language.
The only case I know of where I would need a Rust program is to check a blake3 hash. That won't last.
I am not sure what "essential tool" means if pandoc included in it. For me Intellij, Eclipse, Dbeaver are more essential (+ few other Specific tools based on Eclipse).
C# - I am not sure, MS Office?
I've heard good things about Bat and Exa - I personally have never felt a huge need for them, but other people claim that they're pretty essential to them.
- a single binary you can drop in ~/bin
- native Linux version
- really, really fast
- git branches in the top bar by default
Cons (beside being super new and lacking ecosystem):
- Use a custom window border, which is also pretty ugly IMO
- cannot use arrow keys in the command palette (or any file dialog). I guess it's a bug?
- default key bindings are... weird? ctrl+f doesn't prompt a find box for example
- cannot make syntax highlight work even on common formats like MarkDown, JSON or YAML
So, it feels very immature but for sure it is a great starting point, if I get good syntax highlight and code completion with a LSP (although it should already work) I might see me switching from VS Code to it, at least partially.
> - a single binary you can drop in ~/bin
Well, a binary larger than quite some operating systems. (And not even talking about the security issues with such an approach).
> - native Linux version
Well, it's as "native" as an Electron app as it'll execute native machine code at some point. ;-) Besides that it feels as "native" as an Electron app… The UX is much more important than the actual technology used, imho!
> - really, really fast
I didn't measure anything but at least it feels as fast as my "dumb desktop editor", which is Kate. Only that Kate is usable right now, and has in fact quite some features.
The good parts:
- Lapces packaging issue is solvable.
- Rust is a fast language so I think Lapce won't become too slow as development progresses.
But the no-native UX is an issue. It likely won't ever feel more "native" than any random Electron app; love it or hate it.
But at least I'm looking forward to something like Slint GUI (which hopefully will feel native to my KDE Desktop once it'll be ready).
There's dozen of us! :)
As a matter of interest, have you managed to get a satisfactory Rust/LSP/Rust-Analyzer/Cargo setup running with your Kate install?
(Also, Kate as an AppImage seems to be ~150-185MB as a data point for comparisons. (`libKF5TextEditor.so.5` is ~3.5MB.))
The whole "native UI" aspect is a reasonable discussion point but given I seem to be running GTK/Flatpak-based distros I despair of ever having something "native" that I also think is good. :D (Elementary OS at least got me close enough to finally mostly move away from Mac.)
I do think native file dialog boxes are generally a nice addition as a halfway point.
Never tried. Like I said, Kate is my "dumb desktop editor". For coding I'm currently using VSC (and have still an IntelliJ install around, in case of).
The AppImage size of Kate is just crazy! Didn't know. That's also not really acceptable. The package version is only 7 MB uncompressed… (And all the libs are shared as I'm using KDE anyway).
Regarding the UX: Maybe I'm just lazy but I'm not keen on learning and remembering different details in how applications work. The "feel" in the 'look & feel' of an app is the most important thing. But as people here mentioned Lapce does not even handle clicks in an "usual" way. A native file dialog is just the tip of the things that should feel "native", imho.
I think it's a great project with a lot of potential, but I'll give it at least a year or two before general usability.
Maybe you were emphasizing more on the theming/design principles than the technology behind it. In that area I just think Druid needs more work to allow using native dialogs for certain specific elements (file dialog, right click menu, etc.), which is what Qt already does.
Yeah, this seems to be an unfortunate bug. FWIW I linked to a workaround that enabled me to try the app's functionality more here: https://news.ycombinator.com/item?id=30718638
> I couldn't figure out how to search for an extension.
AFAICT there is only one extension/plugin currently (for Rust Analyzer) which is installable via the "puzzle piece" icon on the left side of the editor window.
In general it seems like non-modal people currently need to setup keybindings to get a usable editor.
I totally agree that in a ltr context left side screams "focus point".
On the other hand, the project drawers/file explorer is mostly toggled off while I work, so it doesn't take any screen real estate.
And when I need it, it makes sense to be on the left side.
I prefer to explore via some search mechanism though.
Project drawers are only needed for special cases, like getting a feel for the overall structure of a project.
the main reason I change the sidebar's width is to recenter my text depending on my position in front of my screen aha... guess it's a case of the 1172s
What's wrong with moving the whole text?
Actually I don't remember any longer when they changed, maybe VS 2010 WPF rewrite.
If for some reason you needed to resize the left side very often, or it would even resize automatically, I would understand the concern.
- window-operation buttons on macos (close, maximize ...)
- application-menus in gnome, macos etc (file, edit, view ...)
- heavy-used buttons in browser (page back, refresh ...)
So everything build for him (as NextStep and macOS) has every GUI element on "the wrong side"… ;-)
> I moved it to the right ever since.
What text editor are you using?
2. Edit text.
Flows from left to right.
Honestly, this behavior makes using a vertical monitor almost impossible. Wish VSCode let me configure it like Rider/IntelliJ so the sidebar is just a popover-style drawer rather than a push-style drawer.
That's worse for your neck than keep it more center aligned.
https://news.ycombinator.com/item?id=29549173 "Lapce – Fast and Powerful Code Editor written in Rust" (333 points | 3 months ago | 145 comments)
https://news.ycombinator.com/item?id=30526693 "Show HN: Lapce – open-source code editor inspired by Xi-editor" (7 points | 15 days ago | 2 comments)
https://lite-xl.com/ is another one which is written in Lua. Brilliant and super fast. It is much more polished than Lapce but still rough around the edges with features though.
Another one is Micro which is cool too.
Either way I am loving the fact that new OSS text editors coming out.
It's an awesome little editor. I quit using it though because it seemed like the future direction of the project wasn't very clear, and from a practical standpoint VS Code simply has a better developer experience, but I had great fun hacking around it nevertheless.
One of my favorite things about rxi/lite and Lite XL is just how easy it is to write plugins. Simply create a new .lua file in the plugins directory and monkey-patch whatever you need. And while it might seem like monkey-patching isn't the most clean solution, that's not exactly true — the source code of the editor doesn't need to be cluttered with explicit hooks, and plugins interoperate with each other very well, because one plugin doesn't know about the others' existence. From its standpoint it just modifies the vanilla editor.
This extensibility allowed me to write some really cool stuff, the one plugin I'm especially proud of is lint+ [1], which leverages the immediate mode nature of the UI to draw pretty lint messages atop the text editor (and it even renders Rust's friendly compiler errors with little rails on the left! see issue #3 [2]).
Can recommend.
[1]: https://github.com/liquidev/lintplus
[2]: https://github.com/liquidev/lintplus/issues/3Nice!
You might like to show your work on that to https://twitter.com/ekuber if you've not already done so.
I'm using the mentioned lint+ plugin, but for example also the LSP plugin, which is extremely useful, and a lot of others as well.
I love how fluid the entire editor feels (mostly, sometimes there's a small delay e.g. when I close the last tab in a language which terminates the language server synchronously). It's also extremely nice in terms of scaling support (super fine-grained and high quality at any scale).
What does this mean? Is it like Emacs' TRAMP[1]?
Or trying to be.
Why does Rust folks seem to encapsulate and separate their stuff more and more? Own build-tools and infrastructure are one thing. Am I right that Druid is not an very own Toolkit but a layer like WxWidgets?
Here are the goals of Druid; be sure to read about the non-goals too: https://github.com/linebender/druid#Goals
https://josephg.com/blog/electron-is-flash-for-the-desktop/
Why companies use Electron? It saves them money! And the users pay for CPU, RAM and suffer from bad usability. But that doesn't show up on your bill from Microsoft, Zoom, Spotify or Slack. And when your stuck with one software migration to better is hard. Steve Jobs killed Flash for just on reason, battery drain ^^
- it's fast
- has a built in terminal
- single binary
-rudimentary git support.
- It detected my virtualenv and opened the terminal accordingly.
Kudos to the developers, If you don't like it, it doesn't've to be your daily driver, won't be mine but this is amazing work
But this is in a pre pre-alpha stage, so many bugs it's far too early for public feedback. It loads reasonably fast except chrome stats in top left then jerks towards the center. The start page says to bring up the command palette which I was unable to navigate via keyboard.
The open file dialog takes an eternity to load the first time, the path is in a text box that's not editable. Focusing a text file gives an Insert cursor which is in text mode, there's a noticable slow delay before writing the first character, text selection is non existent so lacks basic text editing features.
There is a built-in terminal however there's only a single tab.
The only thing that gives it potential is that the folder/file browsing is super quick even with a node_modules folder so it might be built on efficient rendering that can be improved.
Even for such a basic editor it's 38mb download. For a far smaller + more complete editor checkout Lite:
% touch test
% lapce test
thread 'main' panicked at 'Error in Surface::configure: parent device is lost', /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.12.0/src/backend/direct.rs:214:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
% RUST_BACKTRACE=full lapce test
thread 'main' panicked at 'Error in Surface::configure: parent device is lost', /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.12.0/src/backend/direct.rs:214:9
stack backtrace:
0: 0x56474aaac84c - <unknown>
1: 0x56474aad958c - <unknown>
2: 0x56474aaa38f8 - <unknown>
3: 0x56474aaaeea7 - <unknown>
4: 0x56474aaaeb6f - <unknown>
5: 0x56474aaaf60a - <unknown>
6: 0x56474aaaf2f7 - <unknown>
7: 0x56474aaaccf4 - <unknown>
8: 0x56474aaaeff9 - <unknown>
9: 0x5647494db8e3 - <unknown>
10: 0x56474a7d8499 - <unknown>
11: 0x56474a7d8f62 - <unknown>
12: 0x56474a6b7345 - <unknown>
13: 0x56474984e455 - <unknown>
14: 0x564749657184 - <unknown>
15: 0x56474953e4a5 - <unknown>
16: 0x5647494ee8b6 - <unknown>
17: 0x5647494dc243 - <unknown>
18: 0x5647494dc2b9 - <unknown>
19: 0x56474aaabf31 - <unknown>
20: 0x5647494dc282 - <unknown>
21: 0x7f084a6d3310 - __libc_start_call_main
22: 0x7f084a6d33c1 - __libc_start_main@GLIBC_2.2.5
23: 0x5647494dc165 - <unknown>
24: 0x0 - <unknown>
Arch Linux, lapce 0.0.10, Rust 1.61.0-nightly, Sway/Wayland.Safe Rust has the same properties as a managed language, one is going to spend an order of magnitude less time hunting for bugs.
(At least the WGPU experience seems better than OpenGL, when you don't even get an assert or a stack trace, just an invisible error that you can only fetch by using glGetError() and is going to be hell of a shitty time trying to debug it and then sometimes you get to the conclusion that it might actually be a driver bug...)
This is extremely frustrating, perhaps it was done to give the illusion of speed, or it's a side-effect of the immaturity of the GUI framework? If you click and hold on the tab close button on your browser, and then move your mouse away and depress the button, you have the possibility to abort the action.
Another side effect of this seems to be that the GUI does not respond to presses from a touchscreen (on laptops), which does not behave like a mouse input, but still fires click events that most applications happily accept.
1. a brief or temporary failure of concentration, memory, or judgement.
synonyms: failure, failing, slip, error, mistake, blunder, fault, omission, oversight, negligence, dereliction, slip-up, fail
I would love to know if the IDE frontend could be compiled to Wasm (using WebGL/WebGPU under the hood) so it could run in the browsers, similarly to Makepad [2]
Hopefully this will remind some people how responsive applications should be. Not the _running away through treacle with all your memory under its arm_ that modern tools have become (hello VSCode).
The good: - Half the memory usage on my machine compared to other graphical editors. - It is extremely fast, though as all the missing features get added, we'll see if it stays that way.
Some basic QoL improvements needed - Needs syntax highlighting for more languages (Ruby/JS in my case) - Needs to use the system dialogs on Windows and macOS. Had a difficult time using other drive mount types. The built-in dialog would not open them at first.
I will be keeping an eye on this one. The only one that beats it speed-wise and memory wise is vim. :)
But without an Emacs like Lisp Machine, no can do ;)
When I thought about Lapce's logo, I took the initials of "Lightning" and "Powerful", so put L and P together to form a logo.
I guess Linkin Park is L and P too.
``` $ lapce MESA-INTEL: warning: Haswell Vulkan support is incomplete $ uname -r 5.13.0-35-generic x86_64 x86_64 ``` Ubuntu 21.10
Can I disable it? Because honestly, I don't want to tell my text editor to let me enter text every time I open a file.
I'm not a fan of modal editing either so I appreciate that while the Lapce developer is a fan they at least support non-modal as an option--unlike many other recent Rust-based text editor projects.
Keep up the good work and post again when it's a bit more mature.
Isn't everything amazingly fast on it?
Basic commands like y, d, c + motion are not supported yet.
WASI(https://wasi.dev/) is the system interface.
https://github.com/bytecodealliance/wasmtime/blob/main/docs/...
Great project by the way.
Running with a trace gets:
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `23`,
right: `0`', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/font-kit-0.10.1/src/loaders/freetype.rs:817:13
stack backtrace:
0: rust_begin_unwind
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:498:5
1: core::panicking::panic_fmt
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/panicking.rs:116:14
2: core::panicking::assert_failed_inner
3: core::panicking::assert_failed
4: font_kit::loaders::freetype::Font::rasterize_glyph
5: piet_wgpu::pipeline::Cache::get_glyph_pos
6: piet_wgpu::text::WgpuText::get_glyph_pos
7: piet_wgpu::text::WgpuTextLayout::rebuild
8: <piet_wgpu::text::WgpuTextLayoutBuilder as piet::text::TextLayoutBuilder>::build
9: lapce_core::config::Config::editor_text_width
10: <lapce_core::terminal::LapceTerminal as druid::widget::widget::Widget<lapce_core::data::LapceTabData>>::layout
11: druid::core::WidgetPod<T,W>::layout
12: <lapce_core::scroll::LapcePadding<T,W> as druid::widget::widget::Widget<T>>::layout
13: druid::core::WidgetPod<T,W>::layout
14: <lapce_core::terminal::LapceTerminalView as druid::widget::widget::Widget<lapce_core::data::LapceTabData>>::layout
15: druid::core::WidgetPod<T,W>::layout
16: <lapce_core::split::LapceSplitNew as druid::widget::widget::Widget<lapce_core::data::LapceTabData>>::layout
17: druid::core::WidgetPod<T,W>::layout
18: <lapce_core::terminal::TerminalPanel as druid::widget::widget::Widget<lapce_core::data::LapceTabData>>::layout
19: druid::core::WidgetPod<T,W>::layout
20: <lapce_core::tab::LapceTabNew as druid::widget::widget::Widget<lapce_core::data::LapceTabData>>::layout
21: <druid::widget::lens_wrap::LensWrap<T,U,L,W> as druid::widget::widget::Widget<T>>::layout
22: druid::core::WidgetPod<T,W>::layout
23: <lapce_core::window::LapceWindowNew as druid::widget::widget::Widget<lapce_core::data::LapceWindowData>>::layout
24: <druid::widget::lens_wrap::LensWrap<T,U,L,W> as druid::widget::widget::Widget<T>>::layout
25: druid::core::WidgetPod<T,W>::layout
26: druid::window::Window<T>::layout
27: druid::window::Window<T>::do_paint
28: druid::win_handler::AppState<T>::paint_winit_window
29: druid::app::AppLauncher<T>::launch::{{closure}}
30: winit::platform_impl::platform::x11::EventLoop<T>::run_return::single_iteration
31: winit::platform_impl::platform::x11::EventLoop<T>::run
32: winit::platform_impl::platform::EventLoop<T>::run
33: winit::event_loop::EventLoop<T>::run
34: lapce_core::app::lanuch
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Agree with other comments here that it's a bit too unusable at the moment, and unfortunately I wasn't even 30 seconds into my demo before this happened, so I can't really comment on the rest of the application.As for whoever is downvoting my previous comment. Seriously?
But one thing makes me uncomfortable regardless of its early state: It's gigantic!
It's a 55 MB executable. You could fit at least one hundred full blow almost self contained (CLI) text-editors with the feature-set of Lapce in that size…
What is going on there? Does it bundle an operating system, or even a whole EMACS distribution in that binary?
Besides that it feels like VSCode. Not regarding speed, Lapce feels faster for sure. But with its custom GUI there is actually no gain regarding UX compared to any "desktop-webpage-container" (a.k.a. Electron app), imho. "Native" applications that don't feel native just "aren't native" — regardless the technology used.
The other but related issue is (even it's not really on Lapce) that those Rust GUI toolkits are imho light-years away from being production ready. So not only that Lapce feels "not native" (which is bad on its own, as it's than the UX of "just another webpage") but additionally it will likely take years just for the used GUI toolkit to catch up with the state of the art.
Of course I wish the authors luck with their project! But it looks to me like it'll be a quite long journey up to the finish line. So they will also need some staying power. Especially as there seems to be some competition¹ in the space of "VSCode alikes"…
There are a few factors that contribute more or less to this. In no particular order:
- many dependencies badly handle additional, potentially unwanted features (many aren't optional at all and take runtime checked branches)
- lto is disabled by default on release builds
- release builds still bundle a lot of debug info (should only affects binary, not memory size)
- backtracing on panic pulls in a big backtracing library, formating code and string literals
Enabling lto shaved off 10mb of my build just now
Sure, why not, I've got time to waste on endless bikeshedding... :D
IMO 55MB isn't "gigantic"--a 450MB binary could rightly be called "gigantic": https://github.com/lapce/lapce/issues/24#issuecomment-100122... (But, ya know, ya don't get this here debugging info for free.)
FWIW the Linux binary I downloaded can be immediately shrunk from 57413256 bytes to 44604432 bytes (~43MB) by running `strip` on it.
I imagine further size reductions can be found by following the, by now, "standard", list of steps at https://github.com/johnthagen/min-sized-rust but for a pre-pre-alpha personal project I imagine doing so is not a high priority.
Also FWIW comparing a "self contained (CLI)" to a self-contained GUI editor seems pretty apples to oranges as comparisons go...
I will accept though a 3x multiplier on the "bloated" `emacs25-nox` (~15MB) and a 50x on the svelte `vim.tiny` (~11MB) I found installed locally. (Apparently `emacs25-x` on another machine weighs in at ~17MB so I guess that's the eventual target. :D )
My primary interest in Lapce is for editing Rust code with LSP/Rust-Analyzer support (the latter being where there's actually issues with regard to constrained development environments), I recently almost got there with the KDE Kate editor but a Rust built editor with WASM/WASI as a target for plugins seems more attractive to me going forward.
But my comment was more about the binary size.
I'm very much not a fan of this static compiled apps even I understand that from the developers standpoint they're nice. But properly packaging such a thing is usually more involved as I would be if is would be modular from the get go.
AppImages are a bit better as they're an "overlayed" bundle but still the usual problems remain.
How big would it be if it would use the dynamic libs provided by an distribution actually? I guess not bigger than Kate. :-)