awrit
awrit copied to clipboard
Rewrite with Electron/Typescript
Why?
- Moving to Electron makes implementing these issues trivial
- #3
- #36
- #35
- #18
- #29
- #4
- Nobody has ported the extensions API from Chromium to Chromium Embedded Framework (CEF), it is practically unusable
- Electron has basic support for extensions but someone already put in the hard work to get many useful extensions working by porting more of the API over to Electron
- CEF's Chrome runtime doesn't support OSR, but does support extensions
- Developer tools don't work with OSR under CEF
- After more than a year, there have been no contributors willing to help with features or maintenance
- Some explicitly refused to work with C++. TypeScript is widely-used amongst both experienced and new developers, according to StackOverflow's survey.
Problems?
This shouldn't be too difficult, but it does mean that there will be some performance regressions in frequently called, low-latency code that will require some native addons or extensions using WASM. First thing that comes to mind is converting the NativeImage of the painted area to the right format before blitting to Kitty.
@GustavoJCL if you're still interested in contributing to the rewrite, I've started a fresh branch electron: https://github.com/chase/awrit/tree/electron
Mouse input needs to be fixed, so if you want to debug and tackle that, I'd appreciate it!
So far, the only thing implemented so far is the input test, which can be run with: npm run input-test (after installing the project with npm install of course)
yes of course, I will try to fix it
@GustavoJCL The code missing the DEC MODE character, adding that fixed it! https://github.com/chase/awrit/commit/09b5bec8ac0743f7f7bffa21bb6e15ea55e6d510
Sorry, I didn't have much time that month. Now I can contribute more actively to rewriting it in Electron. What elements or modules need to be implemented?
Sorry, I didn't have much time that month. Now I can contribute more actively to rewriting it in Electron. What elements or modules need to be implemented?
No problem at all, I've been quite busy myself.
Honestly, there's quite a bit to be done still. Electron's ecosystem is still quite frustrating to work with.
I guess the first few things to solve:
- [x] Drop
electron-vite, it doesn't work well with escape codes and there's no real way to get around that. - [x] Switch to
tsxwith watch mode for transpiling the CLI's TypeScript to JavaScript - [x] Switch to
esbuildfor the Electron scripts that are run viaelectron whatever.js - [x] Use the graphics test/demo I wrote as a reference and combine the frame compositor with the offscreen Electron window's frame and damaged area callbacks
- This should get things rendering
- [x] Use the input test as a reference and translate it to the input events that Electron understands to get input working
That should bring it almost to parity with the existing implementation.