Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Write RUST Pre-RFC #84

Closed
wants to merge 10 commits into from
60 changes: 43 additions & 17 deletions 0000-rust-script.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
- Feature Name: (fill me in with a unique ident, `my_awesome_feature`)
- Start Date: (fill me in with today's date, YYYY-MM-DD)
- RFC PR: [rust-lang/rfcs#0000](https://github.com/rust-lang/rfcs/pull/0000)
- Rust Issue: [rust-lang/rust#0000](https://github.com/rust-lang/rust/issues/0000)
- Feature Name: Rust-script extension for Cargo
- Start Date: 7-29-2022
- RFC PR: TBD
GitaWei marked this conversation as resolved.
Show resolved Hide resolved
- Rust Issue: TBD


# Summary
[summary]: #summary

One paragraph explanation of the feature.
The rust-script plugin for Cargo is expected to be a start point for expediting productivity in newly interested developers. The idea is to remove some of the startup project complexity in favor of a small amount of predictable rigidity to allow idiomatic project creation. There are several additional areas where this tool may also be useful. These will be further highlighted in this RFC.


# Motivation
[motivation]: #motivation

Why are we doing this? What use cases does it support? What is the expected outcome?
Why are we doing this?

To continue the adoption of the Rust programming language to an expanded audience of developers. Additionally, it is the hope that simplicity can be attained for certain subsets of development activities.

What is the expected outcome?

Introduction to and productivity in Rust for the newcomer and novice, this can help them gain confidence and indoctrinate in the Rust environment. It is also expected to expedite writing small tools that may fit into the cargo xtasks genre of activities.

# Guide-level explanation
[guide-level-explanation]: #guide-level-explanation

TBD

Explain the proposal as if it was already included in the language and you were teaching it to another Rust programmer. That generally means:

- Introducing new named concepts.
Expand All @@ -40,35 +50,50 @@ The section should return to the examples given in the previous section, and exp
# Drawbacks
[drawbacks]: #drawbacks

Why should we *not* do this?
1. Conflicting work and projects
2. Cargo evolutional conflicts
3. The possibility to confuse or distract developers


# Rationale and alternatives
[rationale-and-alternatives]: #rationale-and-alternatives

- Why is this design the best in the space of possible designs?
- What other designs have been considered and what is the rationale for not choosing them?
- What is the impact of not doing this?

- Why is this design the best in the space of possible designs? TBD
- What other designs have been considered and what is the rationale for not choosing them? Too many others
- What is the impact of not doing this? Missed opportunity


# Prior art
[prior-art]: #prior-art

Discuss prior art, both the good and the bad, in relation to this proposal.
A few examples of what this can include are:
* cargo-script - the unmaintained project that rust-script was forked from.
* cargo-eval - maintained fork of cargo-script.
* cargo-play - local Rust playground.
* runner - tool for running Rust snippets.
* scriptisto - language-agnostic "shebang interpreter" that enables you to write scripts in compiled languages.

- For language, library, cargo, tools, and compiler proposals: Does this feature exist in other programming languages and what experience have their community had?
- For community proposals: Is this done by some other community and what were their experiences with it?
- For other teams: What lessons can we learn from what other communities have done here?
- Papers: Are there any published papers or great posts that discuss this? If you have some relevant papers to refer to, this can serve as a more detailed theoretical background.
Next we will generically discuss this prior art, both the good and the bad, in relation to this proposal.

This section is intended to encourage you as an author to think about the lessons from other languages, provide readers of your RFC with a fuller picture.
If there is no prior art, that is fine - your ideas are interesting to us whether they are brand new or if it is an adaptation from other languages.

Note that while precedent set by other languages is some motivation, it does not on its own motivate an RFC.
Please also take into consideration that rust sometimes intentionally diverges from common language features.

# Unresolved questions
[unresolved-questions]: #unresolved-questions

* How do we interact with workspaces? question
* Use rust-version field for toolchain version enhancement question
* Define cargo-xtask behaviors enhancement
* Share a lock file across scripts enhancement question
* How much should main detection align with rustdoc? question
* How do we balance reducing boilerplate in scripts while allowing reproducibility across systems question
* Define how this interacts with cargo config files enhancement
* Rust toolchain files interactions definition
* Identify a final command name and file extension


- What parts of the design do you expect to resolve through the RFC process before this gets merged?
- What parts of the design do you expect to resolve through the implementation of this feature before stabilization?
- What related issues do you consider out of scope for this RFC that could be addressed in the future independently of the solution that comes out of this RFC?
Expand All @@ -93,3 +118,4 @@ Note that having something written down in the future-possibilities section
is not a reason to accept the current or a future RFC; such notes should be
in the section on motivation or rationale in this or subsequent RFCs.
The section merely provides additional information.