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

static method support #1074

Open
chenzww opened this issue Oct 17, 2021 · 5 comments
Open

static method support #1074

chenzww opened this issue Oct 17, 2021 · 5 comments
Labels
good first issue Good for newcomers to get started with development

Comments

@chenzww
Copy link

chenzww commented Oct 17, 2021

It seems that, uniffi-rs does not to support static method/associated function yet.

┆Issue is synchronized with this Jira Task
┆Issue Number: UNIFFI-100

@ernestask
Copy link

Hey, is there a consensus on this from the maintainers? I’d be willing to look into this.

@mhammond
Copy link
Member

I don't know if any of the maintainers have thought this through as the need hasn't come up in our use-cases. I suspect the answer will depend on the implementation - ie, how much complexity/overhead it adds vs the current scenario of just using namespace functions.

@ernestask
Copy link

Given that constructors are implemented through class/static/whatever methods and that Web IDL does have a concept of static operations, maybe there wouldn’t be a lot of novel code.

@conanoc
Copy link

conanoc commented Sep 7, 2023

I vote for this. It would be great if I could use #[uniffi::export] attribute on static methods.

@Jomy10
Copy link

Jomy10 commented Nov 18, 2024

I also vote for this, it's a limiting factor in my current project.

@bendk bendk added the good first issue Good for newcomers to get started with development label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers to get started with development
Projects
None yet
Development

No branches or pull requests

6 participants