feather-rs / feather

A Minecraft server implementation in Rust
Apache License 2.0
2.61k stars 142 forks source link

Turned `quill::plugin` into a proc macro #528

Closed FussballAndy closed 2 years ago

FussballAndy commented 2 years ago

Turned quill::plugin into a proc macro

Status

Description

Made it so that a plugin is initialized using

#[plugin::quill]
struct MyPlugin;

instead of

struct MyPlugin;

quill::plugin!(MyPlugin);

Note: Although it works, someone that knows how to do proc macros should maybe check the code for improvements that could be done.

Related issues

Checklist

Note: if you locally don't get any errors, but GitHub Actions fails (especially at clippy) you might want to check your rust toolchain version. You can then feel free to fix these warnings/errors in your PR.