1use std::cell::RefCell;
2use std::collections::HashMap;
3
4use pax_manifest::PaxManifest;
5use pax_runtime::{ComponentInstance, ExpressionContext, InstantiationArgs};
6use pax_runtime_api::pax_value::PaxAny;
7use piet_common::RenderContext;
8use std::rc::Rc;
9
10const PLACEHOLDER_ERROR : &str = "Fatal: the development placeholder cartridge is still attached -- a defined cartridge must be attached during compilation. This means that Pax compilation failed -- please try again with `pax build` or `pax run`.";
11pub const INITIAL_MANIFEST: &str = "<manifest placeholder>";
12
13pub fn instantiate_expression_table() -> HashMap<usize, Box<dyn Fn(ExpressionContext) -> PaxAny>> {
14 unreachable!("{}", PLACEHOLDER_ERROR)
15}
16
17pub fn instantiate_component_stacker<R: 'static + RenderContext>(
18 _args: InstantiationArgs,
19) -> Rc<RefCell<ComponentInstance>> {
20 unreachable!("{}", PLACEHOLDER_ERROR)
21}
22
23pub fn instantiate_main_component() -> Rc<ComponentInstance> {
24 unreachable!("{}", PLACEHOLDER_ERROR)
25}
26
27pub struct DefinitionToInstanceTraverser {}
28
29impl DefinitionToInstanceTraverser {
30 pub fn new(_manifest: PaxManifest) -> Self {
31 unreachable!("{}", PLACEHOLDER_ERROR)
32 }
33
34 pub fn get_main_component(&mut self) -> Rc<ComponentInstance> {
35 unreachable!("{}", PLACEHOLDER_ERROR)
36 }
37
38 pub fn get_manifest(&self) -> &pax_manifest::PaxManifest {
39 unreachable!("{}", PLACEHOLDER_ERROR)
40 }
41}