Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support exporting .ysls files #140

Open
janhohenheim opened this issue May 30, 2023 · 1 comment
Open

Support exporting .ysls files #140

janhohenheim opened this issue May 30, 2023 · 1 comment
Labels

Comments

@janhohenheim
Copy link
Member

No description provided.

@janhohenheim janhohenheim added this to the Initial Release milestone May 30, 2023
@janhohenheim janhohenheim added the good first issue Good for newcomers label Jun 10, 2023
@janhohenheim janhohenheim removed this from the Initial Release milestone Jun 11, 2023
@simonhdickson
Copy link

I have this working in a project I'm working on. It works fine for functions as they implement this:

/// The [`TypeId`]s of the parameters of this function.
fn parameter_types(&self) -> Vec<TypeId>;
/// The [`TypeId`] of the return type of this function.
fn return_type(&self) -> TypeId;

But commands don't so so I have to implement my commands in quite a hacky way:

/// A type-erased [`YarnCommand`] as it appears in the [`YarnCommands`].
pub trait UntypedYarnCommand: Debug + Send + Sync + 'static {
#[doc(hidden)]
fn call(&mut self, input: Vec<YarnValue>, world: &mut World) -> Box<dyn TaskFinishedIndicator>;
#[doc(hidden)]
fn clone_box(&self) -> Box<dyn UntypedYarnCommand>;
}

I had a look at trying to make this change but I haven't quite figured out how to update the macro correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants