Passing (static) arguments to crates
Nobody has claimed this yet.
- Dominant language
- Markdown
- Stars
- 6.6k
- Forks
- 1.7k
- Avg merge
- 16h 14m
- Merged PRs (30d)
- 1
Description
Throwing an idea into the air. Most likely something that won't be tractable, but I've come upon a want for it at least twice.
Idea: be able to pass arguments to crates.
enum Foo { A, B }
extern crate mylib(Foo);
Currently, the alternatives are basically only
#[macro_use] extern crate mylib;
enum Foo { A, B }
mylib_implementation!(Foo);
Which is kind of ugly, as it requires to put a lot of code of mylib in a macro, and makes the call site less nice too.
Again, this is just an idea thrown into the air, I'm not really convinced it should get in either. Just wanting to see what other folks think about it, given I couldn't find a related issue (but these keywords are not really easy to search, so I may very well have missed something).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the proposed extern crate mylib(Foo); syntax and the macro-based alternative shown in this issue. Determine whether passing arguments to crates is tractable within Rust's RFC process; done means a scoped proposal with feasibility and implementation implications, or a documented decision not to pursue it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100