pub struct NativeTsRuntime { /* private fields */ }Expand description
Runtime that compiles TypeScript to a native executable and speaks JSON over stdin/stdout with that executable.
Implementations§
Source§impl NativeTsRuntime
impl NativeTsRuntime
Sourcepub const DEFAULT_MAX_STDOUT_BYTES: usize
pub const DEFAULT_MAX_STDOUT_BYTES: usize
Default maximum bytes retained from a compiler or runtime stdout pipe.
Sourcepub const DEFAULT_MAX_STDERR_BYTES: usize
pub const DEFAULT_MAX_STDERR_BYTES: usize
Default maximum bytes retained from a compiler or runtime stderr pipe.
pub fn new(config: NativeTsRuntimeConfig) -> Self
pub fn config(&self) -> &NativeTsRuntimeConfig
Sourcepub fn with_output_limits(
self,
max_stdout_bytes: usize,
max_stderr_bytes: usize,
) -> Self
pub fn with_output_limits( self, max_stdout_bytes: usize, max_stderr_bytes: usize, ) -> Self
Override the independent byte limits for each compiler and runtime stdout/stderr pipe.
Exceeding either limit terminates the direct child process and returns a runtime error. A zero limit allows an empty pipe but rejects its first byte of output.
Sourcepub fn max_stdout_bytes(&self) -> usize
pub fn max_stdout_bytes(&self) -> usize
Return the configured byte limit for each stdout pipe.
Sourcepub fn max_stderr_bytes(&self) -> usize
pub fn max_stderr_bytes(&self) -> usize
Return the configured byte limit for each stderr pipe.
Sourcepub fn with_compile_timeout(self, timeout: Duration) -> Self
pub fn with_compile_timeout(self, timeout: Duration) -> Self
Set the maximum duration of each cold compiler process.
Cache hits do not start a compiler and therefore do not consume this timeout. By default, compilation has no runtime-owned timeout and remains bounded only by caller cancellation or an outer host timeout.
Sourcepub fn with_invocation_timeout(self, timeout: Duration) -> Self
pub fn with_invocation_timeout(self, timeout: Duration) -> Self
Set the maximum duration of each workflow or step artifact invocation.
The timeout covers writing the complete request to stdin, reading both output pipes, and waiting for process exit. By default, invocation has no runtime-owned timeout and remains bounded only by caller cancellation or an outer host timeout.
Sourcepub fn compile_timeout(&self) -> Option<Duration>
pub fn compile_timeout(&self) -> Option<Duration>
Return the configured cold-compilation timeout, if any.
Sourcepub fn invocation_timeout(&self) -> Option<Duration>
pub fn invocation_timeout(&self) -> Option<Duration>
Return the configured workflow and step invocation timeout, if any.
pub async fn preflight( &self, spec: &WorkflowSpec, ) -> Result<NativeTsRuntimePreflight>
Trait Implementations§
Source§impl Clone for NativeTsRuntime
impl Clone for NativeTsRuntime
Source§fn clone(&self) -> NativeTsRuntime
fn clone(&self) -> NativeTsRuntime
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more