1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//! Library entry points for `tino`.
//!
//! `tino` is primarily a command-line tool: a tiny init process (PID 1) for
//! Docker, Kubernetes, and other container workloads. The library surface is
//! intentionally small and mirrors the binary's runtime behavior.
//!
//! The main entry point is [`run`], which executes a parsed [`Cli`] value.
//! Linux-specific restrictions such as Landlock are configured through CLI
//! flags and follow the same semantics as the `tino` binary.
//!
//! # Example
//!
//! ```no_run
//! use tino::{Cli, run};
//!
//! let cli = Cli::parse_from(["tino", "--", "/usr/bin/sleep", "10"]);
//! let exit_code = run(cli)?;
//! # let _ = exit_code;
//! # Ok::<(), tino::Error>(())
//! ```
//!
//! This crate is binary-first. Internal helper APIs are not part of the
//! stable public interface unless they are explicitly documented here.
/// Parsed `tino` command-line configuration.
///
/// This type mirrors the `tino` binary CLI and is intended to be constructed
/// through [`Cli::parse`], [`Cli::parse_from`], or [`Cli::try_parse_from`],
/// rather than by manually filling every field.
pub use ;
/// Bundled project license text.
///
/// This is the same text printed by the `--license` CLI flag.
pub const LICENSE_TEXT: &str = include_str!;
pub use ;
/// Execute `tino` with a parsed [`Cli`] configuration.
///
/// Returns the final process exit code that should be used by the caller.
/// Errors are reserved for configuration, setup, or runtime failures that
/// prevent normal supervision from completing.
///
/// In typical usage, the `tino` binary calls this function and then exits with
/// the returned code.