Skip to content

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

@sporkmonger

Description

@sporkmonger

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/plugin-apiCategorizes the issue or PR as relating to the plugin API or SDK.kind/docsCategorizes issue or PR as related to documentation.kind/usabilityCategorizes issue or PR as related to improving some aspect of usability.rustPull requests that update Rust code

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions