jail/lib.rs
1// Copyright 2023 The ChromiumOS Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5mod config;
6#[cfg(any(target_os = "android", target_os = "linux"))]
7pub mod fork;
8#[cfg(any(target_os = "android", target_os = "linux"))]
9mod helpers;
10
11pub use crate::config::JailConfig;
12#[cfg(any(target_os = "android", target_os = "linux"))]
13pub use crate::fork::fork_process;
14#[cfg(any(target_os = "android", target_os = "linux"))]
15pub use crate::helpers::*;
16
17// TODO(b/268407006): We define Minijail as an empty struct as a stub for minijail::Minijail on
18// Windows because the concept of jailing is baked into a bunch of places where it isn't easy to
19// compile it out. In the long term, this should go away.
20#[cfg(windows)]
21pub struct FakeMinijailStub {}