mirror of
https://github.com/Astatin3/unshell.git
synced 2026-06-09 06:47:59 -06:00
Add compile-time leaf declarations
Introduce a function-like leaf declaration macro, bind endpoint and TUI hosts to shared generated metadata, and move remote shell endpoint construction out of the leaf module into the examples and runtime assembly code.
This commit is contained in:
@@ -23,7 +23,7 @@ use super::errors::ShellLeafError;
|
||||
/// one opening procedure and one live hook remains direct and visible.
|
||||
#[derive(Procedure)]
|
||||
#[procedure(leaf = RemoteShellEndpoint, name = "open")]
|
||||
pub struct ProcedureOpen {
|
||||
pub struct Open {
|
||||
/// Spawned PTY child process.
|
||||
pub(super) child: Box<dyn portable_pty::Child + Send>,
|
||||
/// Process-group leader used for Unix hangup and kill signaling.
|
||||
@@ -52,7 +52,7 @@ enum OutputEvent {
|
||||
ReaderClosed,
|
||||
}
|
||||
|
||||
impl ProcedureOpen {
|
||||
impl Open {
|
||||
pub(super) fn spawn(
|
||||
return_path: Vec<String>,
|
||||
hook_id: u64,
|
||||
@@ -213,7 +213,7 @@ impl ProcedureOpen {
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for ProcedureOpen {
|
||||
impl Drop for Open {
|
||||
fn drop(&mut self) {
|
||||
let _ = self.terminate();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user