Skip to main content

CompilationService

Trait CompilationService 

Source
pub trait CompilationService:
    Send
    + Sync
    + Debug {
    // Required methods
    fn run(&self, cmdline: Option<String>, cwd: Option<PathBuf>);
    fn kill(&self);
}
Expand description

Process-lifecycle surface. Registered in the ServiceRegistry at boot (as CompilationServiceHandle); the AppEffect::CompileRun host arm looks it up and calls CompilationService::run (after creating the *compilation* buffer host-side).

Required Methods§

Source

fn run(&self, cmdline: Option<String>, cwd: Option<PathBuf>)

Launch (or relaunch) a compilation.

cmdline: Some(cmd) runs and records cmd as the last command; None reuses the last command (:recompile / :make with no argument). With no prior command, publishes a Reset explaining there is nothing to recompile and returns without spawning.

cwd: working directory for the child process.

Source

fn kill(&self)

Kill the currently running compilation child process, if any. No-op when no child is running. The reader pipes will EOF on the closed child, and the drain will publish a Finished chunk with the termination summary.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§