myc

Self-custodial remote signer for Radroots apps
git clone https://radroots.dev/git/myc.git
Log | Files | Refs | README | LICENSE

process_v1_unsupported.rs (913B)


      1 //! Fail-closed process execution on unsupported host platforms.
      2 
      3 use crate::{MycCliInvocationV1, MycCommandV1, MycProcessResult};
      4 
      5 /// Rejects execution without acquiring filesystem, database, socket, or
      6 /// provider authority on a platform without the governed native host surface.
      7 #[must_use]
      8 pub fn execute_myc_cli_v1(invocation: MycCliInvocationV1) -> MycProcessResult {
      9     if matches!(invocation.command(), MycCommandV1::Run) {
     10         MycProcessResult::ServiceOrDependencyUnavailable
     11     } else {
     12         MycProcessResult::InputOrConfiguration
     13     }
     14 }
     15 
     16 /// Rejects execution without consulting a signal source on unsupported hosts.
     17 #[must_use]
     18 pub fn execute_myc_cli_v1_with_signal_source<F, S>(
     19     invocation: MycCliInvocationV1,
     20     _make_signal_source: F,
     21 ) -> MycProcessResult
     22 where
     23     F: FnOnce() -> Option<S>,
     24     S: crate::MycProcessSignalSource + 'static,
     25 {
     26     execute_myc_cli_v1(invocation)
     27 }