Skip to main content

simplicity/jet/core/
mod.rs

1// SPDX-License-Identifier: CC0-1.0
2
3use super::init::core::Core;
4use super::JetEnvironment;
5use simplicity_sys::c_jets::frame_ffi::CFrameItem;
6
7/// Type alias for the Core jet environment.
8#[derive(Default, Debug)]
9pub struct CoreEnv {
10    _inner: (),
11}
12
13impl CoreEnv {
14    pub fn new() -> Self {
15        Self { _inner: () }
16    }
17}
18
19impl JetEnvironment for CoreEnv {
20    type Jet = Core;
21    type CJetEnvironment = ();
22
23    fn c_jet_env(&self) -> &Self::CJetEnvironment {
24        &()
25    }
26
27    fn c_jet_ptr(
28        jet: &Self::Jet,
29    ) -> fn(&mut CFrameItem, CFrameItem, &Self::CJetEnvironment) -> bool {
30        super::init::core::c_jet_ptr(jet)
31    }
32}