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

Explore using less macro stuff and rely more on trait features for handler declarations #357

Open
sporkmonger opened this issue Jun 24, 2024 · 0 comments
Labels
area/plugin-api Categorizes the issue or PR as relating to the plugin API or SDK. kind/docs Categorizes issue or PR as related to documentation. kind/usability Categorizes issue or PR as related to improving some aspect of usability. rust Pull requests that update Rust code
Milestone

Comments

@sporkmonger
Copy link
Contributor

The current macro setup doesn't always play nicely with rust-analyzer and it would be nice to have better IDE support while writing plugin logic.

There might be a few ways to do this, but it might be possible to get a blanket implementation of the Guest trait to work?

// something like this maybe
impl<T: HttpHandlers> Guest for T {
    // ...
}

Alternatively, if we hit orphan rule issues, maybe:

struct Wrapper<T: HttpHandlers>(T);

impl<T: HttpHandlers> Guest for Wrapper<T> {
   // ...
}

We probably always need a macro somewhere, but this might cut down on how much the macro is doing and increase what we can document.

@sporkmonger sporkmonger added kind/docs Categorizes issue or PR as related to documentation. kind/usability Categorizes issue or PR as related to improving some aspect of usability. rust Pull requests that update Rust code area/plugin-api Categorizes the issue or PR as relating to the plugin API or SDK. labels Jun 24, 2024
@sporkmonger sporkmonger added this to the Release 0.7.0 milestone Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugin-api Categorizes the issue or PR as relating to the plugin API or SDK. kind/docs Categorizes issue or PR as related to documentation. kind/usability Categorizes issue or PR as related to improving some aspect of usability. rust Pull requests that update Rust code
Projects
None yet
Development

No branches or pull requests

1 participant