Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

move main! macro to its own crate #17

Closed
vitiral opened this issue Jan 22, 2018 · 6 comments
Closed

move main! macro to its own crate #17

vitiral opened this issue Jan 22, 2018 · 6 comments

Comments

@vitiral
Copy link
Contributor

vitiral commented Jan 22, 2018

I mainly want this so I can steal it in and use it in stdcli!

vitiral/stdcli#2

@killercup
Copy link
Owner

Sure, I'm okay with that. It's just that there is at least one huge problem we need to solve:

What should we call this new crate?

(Some other, minor things: Do you want to have the cli parsing and logging stuff as well? If not, it might be easier to just copy the file actually.)

@killercup
Copy link
Owner

Some random ideas:

  • mainly
  • frankfurt (a city on the river Main – 2018 is the year crates are named after cities after all)

@vitiral
Copy link
Contributor Author

vitiral commented Jan 22, 2018

Looking at the file more you might be right -- this macro is really the "tie together" point of your exported API. I think copy/paste might be the way to go.

I think if we could extract the "run" function ONLY that would be good. Such a macro would be generally useful for people's "basic template", at least until the new main semantics hit, to allow ppl to use ? in their main.

On that note, some possible names for a crate that is a shim to use ? and give good error messages could be:

  • runaway
  • mainline (like, mainlining a drug, in this case rust)

@killercup
Copy link
Owner

Hm, not sure if a crate like this pulls its own weight. I means, ?-in-main works in nightly already, incl. nice errors.

@vitiral
Copy link
Contributor Author

vitiral commented Jan 22, 2018

ya, just waiting for nightly is probably good enough for now -- considering it is definitely something on the "hotpath" since it improves docs so much.

Closing this, although I really like the crate name mainline

@vitiral vitiral closed this as completed Jan 22, 2018
@vitiral
Copy link
Contributor Author

vitiral commented Jan 22, 2018

Also, I'm probably just going to inherit this crate as a dependency directly instead, as said in #19

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants