Skip to content

Stop using extern crate for plugins #21043

Closed
@kmcallister

Description

@kmcallister

Then we can skip linking the library and it won't be confusing. Perhaps

#[plugin(...any metas...)] extern crate "my-lib" as foo;

would become

plugin!("my-lib" ...any TTs...);

There's no need for as foo because the library is not linked into the crate at all. The common case is just

plugin!(regex_macros);

when the crate name is a valid identifier and there are no arguments.

This entails making the name plugin! special to the macro expander, since we need to locate plugins before we can load them.

Metadata

Metadata

Assignees

Labels

A-pluginsArea: compiler plugins, doc.rust-lang.org/nightly/unstable-book/language-features/plugin.html

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions