anathema
anathema copied to clipboard
WIP: feature/SSH
Adds an Anathema SSH server that can serve Anathema apps to client SSH connections.
No breaking changes to existing code.
Changes to exisiting code
- Adds a new way to create a Backend which takes in the "output"/Writer. So it is not hardcoded to stdout.
- Added more modifier keys to the Key event (maybe needs to be mapped from crossterm as well)
New code
- Added a feature "ssh" for this. Not sure if this is needed since you just don't use the SSH server if you don't need it
- anathema-ssh crate which exposes the
AnathemaSSHServerandSSHBackend SSHBackendis a think wrapper on TuiBackend but instead of reading events from crossterm (stdin) it directly pop events from the event queueAnathemaSSHServertakes in a "runtime factory" which is a function that will start the runtime. This is called for each new client.- It is therefore the
AnathemaSSHServerthat instantiates the SSHBackend for each client. It will hook it up with the SSH sesession. The runtime factory then get's the new SSHBackend instance.
- It is therefore the
Demo:
https://github.com/user-attachments/assets/cbd29934-2f0c-42c3-b841-314e5c1503c7