[WIP] Initial support for annotations

I still need to see how it can interact with the resource manager.

If I understand this correctly, this means that the metadata can come either from resource_options or (and ?) from annotations. How should this work ?