Skip to content
Discussion options

You must be logged in to vote

Ok, I finally managed to figure it out. Thanks a lot for the help @schungx !

I've added the meta module builder:

use std::sync::Arc;

use anyhow::Result;
use rhai::Engine;
use rhai::Module;
use rhai::Scope;

use super::component_reference::ComponentReference;
use super::component_registry::ComponentRegsitry;

pub struct ComponentMetaModule {
    component_registry: Arc<ComponentRegsitry>,
}

impl ComponentMetaModule {
    pub fn into_global_module(self, engine: &Engine) -> Result<Module> {
        let mut meta_script = String::new();

        for entry in &self.component_registry.components {
            let ComponentReference {
                global_fn_name,
                name,

Replies: 3 comments 17 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
8 replies
@schungx
Comment options

@mcharytoniuk
Comment options

@schungx
Comment options

@mcharytoniuk
Comment options

@schungx
Comment options

Comment options

You must be logged in to vote
9 replies
@schungx
Comment options

@mcharytoniuk
Comment options

@schungx
Comment options

@mcharytoniuk
Comment options

@schungx
Comment options

Answer selected by mcharytoniuk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants