Live data from Hacker News

Show HN: Alacritty, a GPU-accelerated terminal emulator written in Rust

blog.jwilm.io

61–70 of 491 posts

Re: Show HN: Alacritty, a GPU-accelerated terminal emulator written in Rust

#61
post #26

Earlier quoted context omitted.

Glyphs are rasterized once and stored in a texture atlas. When rendering a glyph, the fragment shader pulls from that texture. Once loaded, the glyph stays loaded for the duration of the program.

Any idea how much memory it takes to store the full atlas for a font with full Unicode/emoji support? Also does it work for colored emoji?

~95k UTF characters x font sizes x font styles(bold, italic, etc) x outline size.

It's pretty large.

Re: Show HN: Alacritty, a GPU-accelerated terminal emulator written in Rust

#62
post #4

I love iTerm3, but the speed compared to Terminal.app sometimes makes me jealous. So I guess we all need a faster term emulator :)

Out of curiosity, why do you love iTerm? It's always struck me as kind of ugly (especially its preferences). And AFAIK, the only real feature it has that Terminal.app doesn't (besides the native tmux integration, because I still don't really see the point) is support for apps customizing the 256-color palette on the fly (e.g. the initc capability), and wile I really would like to see Terminal.app gain support for that seeing as how the xterm-256color terminfo it uses declares that it works, lack of support for that isn't a good enough reason to switch away.

Re: Show HN: Alacritty, a GPU-accelerated terminal emulator written in Rust

#63

Earlier quoted context omitted.

Got it, just a heads-ups that texture atlas tends to hammer your GPU texture upload if you want to support UTF or non-latin(esp glyph-based) character sets. Not trying to be discouraging just something to keep in mind if that's a direction you want to go. Pretty excited to see a GPU + Rust based stuff making it out into the wild.

Question: With a modern discrete GPU card wouldn't the texture atlas just end up in it's VRAM as cards these days commonly have >1GB of VRAM? (Sorry if this is a stupid question, still trying to grok opengl)

Sure, but you're either going to have to generate the whole font up-front(can be many thousand characters) or you need to re-upload as you use/generate new characters which can thrash unless you're very careful about the regions you lock(and you have a driver that behaves appropriately).

Most font renderers I know do a tiered LRU cache of 3-4 texture "pages" which hurts your drawcall batching but tends to be a nice tradeoff in texture usage.

Re: Show HN: Alacritty, a GPU-accelerated terminal emulator written in Rust

#64
post #56

Earlier quoted context omitted.

Konsole is the only emulator I've used (other than actual tty) that doesn't have this problem. It's actually been frustrating, becasue there is plenty about it that I don't like. I'll be giving Alacritty a try shortly - if it does what it says on the tin, it's exactly what I've been looking for.

Terminal.app seems to handle this case just fine as well.

Thanks, though I've been on linux for the last couple of years.

On the mac side I had other performance issues with Terminal.app (particularly when using all of widescreen + tmux - lots of flicker during move/refresh operations). iTerm2 did well for me though, iirc.

Re: Show HN: Alacritty, a GPU-accelerated terminal emulator written in Rust

#65

> Make sure you have the right Rust compiler installed. Alacritty is currently pinned to a certain Rust nightly Ok, I'll... um not do that. Hope you publish a build soon though! edit: more seriously, the nightly compiler situation on rust is going to become a problem as it gets more developer use. I really hope they're able to stabilize it. edit 2: I'm really sorry if I derailed the conversation in a not useful way,…

Looking at the code, it looks like this basically only relies on two things: inclusive ranges, and clippy. But you don't have to use clippy this way; it's just one way of doing it. So it's really one feature. EDIT: Oh oops, and custom derive, which is stable in a month. > I really hope they're able to stabilize it In general, "nightly" is never going to be stabilized. Remember, it's how Rust development works. Some p…

My feeling is that having a lot of people running on different rust versions is likely to raise the bar to contribute to the project; for example if I go to hack on a python project the odds that I have to change my interpreter setup are basically zero.

In this specific example, I saw that building the project required mucking with my rust version/setup and decided that the cost of that was too high for me to proceed. Totally possible that I mis-evaluated the cost, but that was what happened in my head.

I don't at all mean to tell you what is best, I do think highly of your project and wish you all the success.

Re: Show HN: Alacritty, a GPU-accelerated terminal emulator written in Rust

#66
post #59

I'd like to host this terminal in a 3D environment. Any plans to enable this? Perhaps with a signed distance field texture. I'm building a 3D game in Rust and would like to be able to drop this in.

Oh, just as interesting, plugging this into VR system! Make it way easier to multitask and work on lots of systems (at the risk of looking incredibly goofy).

Re: Show HN: Alacritty, a GPU-accelerated terminal emulator written in Rust

#67
post #48

> Make sure you have the right Rust compiler installed. Alacritty is currently pinned to a certain Rust nightly Ok, I'll... um not do that. Hope you publish a build soon though! edit: more seriously, the nightly compiler situation on rust is going to become a problem as it gets more developer use. I really hope they're able to stabilize it. edit 2: I'm really sorry if I derailed the conversation in a not useful way,…

Using nightly for a single build and going back to stable for regular work is not hard. It's a command or two to build and switch, and a command to switch back. Using nightly rust to build a project in development to check it out is like using a beta release of a library to build a project to check it out. In both cases, you expect that it will likely be using stable dependencies in the future, and you can still take…

It seems like the Cargo.toml file for binaries should be able to specify this, and cause the crate to be built with the nightly if it is installed. This way you only have to enter cargo build --release.

Re: Show HN: Alacritty, a GPU-accelerated terminal emulator written in Rust

#68
post #56

Earlier quoted context omitted.

Konsole is the only emulator I've used (other than actual tty) that doesn't have this problem. It's actually been frustrating, becasue there is plenty about it that I don't like. I'll be giving Alacritty a try shortly - if it does what it says on the tin, it's exactly what I've been looking for.

Terminal.app seems to handle this case just fine as well.

[deleted]

Re: Show HN: Alacritty, a GPU-accelerated terminal emulator written in Rust

#69
post #2

I'm the author of Alacritty, and I'm here to answer any questions!

My current Bash prompt contains a unicode character. I guess this is unsupported?

Can report find / works very quick on macOS (so quick, it is unreadable), and Fish works as well. Just the Rust install assumed I was using Bash.

Possible bug: on macOS when I minimize Alacritty, and I put it on focus again, it tries to select text. Strangely, not always.

Re: Show HN: Alacritty, a GPU-accelerated terminal emulator written in Rust

#70

Earlier quoted context omitted.

Looking at the code, it looks like this basically only relies on two things: inclusive ranges, and clippy. But you don't have to use clippy this way; it's just one way of doing it. So it's really one feature. EDIT: Oh oops, and custom derive, which is stable in a month. > I really hope they're able to stabilize it In general, "nightly" is never going to be stabilized. Remember, it's how Rust development works. Some p…

My feeling is that having a lot of people running on different rust versions is likely to raise the bar to contribute to the project; for example if I go to hack on a python project the odds that I have to change my interpreter setup are basically zero. In this specific example, I saw that building the project required mucking with my rust version/setup and decided that the cost of that was too high for me to proceed…

To be clear, this is not my project.

Yes, it is absolutely a barrier to contribution. That's part of the trade off a maintainer makes when choosing to use unstable features. It also means getting into distro packagers won't work; as they're all packaging stable only.

Most users are on stable, and with 1.15, the next release, the most used nightly feature is being stabilized. We're working on it!

Post reply on HN