From 3bf315a8ad70424c42e3a6b349f002250d63dd6a Mon Sep 17 00:00:00 2001 From: "L. Davison" Date: Fri, 29 Jul 2022 10:23:37 -0700 Subject: [PATCH 1/6] fix: Write RUST Pre-RFC Using a Rust RFC template start a straw man document. --- 0000-rust-script.md | 102 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 0000-rust-script.md diff --git a/0000-rust-script.md b/0000-rust-script.md new file mode 100644 index 0000000..f08d405 --- /dev/null +++ b/0000-rust-script.md @@ -0,0 +1,102 @@ +- Feature Name: Rust-script extension for Cargo +- Start Date: 7-29-2022 +- RFC PR: TBD +- Rust Issue: TBD + +# Summary +[summary]: #summary + +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? + +To continue the adoption of the Rust programming language to an expanded audience of developers. Additionally, it is the hope tha simplicity can be attained for certain subsets of development activities. + +What use cases does it support? What is the expected outcome? + +# 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. +- Explaining the feature largely in terms of examples. +- Explaining how Rust programmers should *think* about the feature, and how it should impact the way they use Rust. It should explain the impact as concretely as possible. +- If applicable, provide sample error messages, deprecation warnings, or migration guidance. +- If applicable, describe the differences between teaching this to existing Rust programmers and new Rust programmers. + +For implementation-oriented RFCs (e.g. for compiler internals), this section should focus on how compiler contributors should think about the change, and give examples of its concrete impact. For policy RFCs, this section should provide an example-driven introduction to the policy, and explain its impact in concrete terms. + +# Reference-level explanation +[reference-level-explanation]: #reference-level-explanation + +This is the technical portion of the RFC. Explain the design in sufficient detail that: + +- Its interaction with other features is clear. +- It is reasonably clear how the feature would be implemented. +- Corner cases are dissected by example. + +The section should return to the examples given in the previous section, and explain more fully how the detailed proposal makes those examples work. + +# Drawbacks +[drawbacks]: #drawbacks + +Why should we *not* do this? + +# 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? + +# 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: + +- 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. + +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 + +- 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? + +# Future possibilities +[future-possibilities]: #future-possibilities + +Think about what the natural extension and evolution of your proposal would +be and how it would affect the language and project as a whole in a holistic +way. Try to use this section as a tool to more fully consider all possible +interactions with the project and language in your proposal. +Also consider how this all fits into the roadmap for the project +and of the relevant sub-team. + +This is also a good place to "dump ideas", if they are out of scope for the +RFC you are writing but otherwise related. + +If you have tried and cannot think of any future possibilities, +you may simply state that you cannot think of anything. + +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. + From 29a1358df7ae095d0344a4d8d7364eb0358bef8a Mon Sep 17 00:00:00 2001 From: "L. Davison" Date: Fri, 29 Jul 2022 10:56:17 -0700 Subject: [PATCH 2/6] Update 0000-rust-script.md Fix spelling error plus more --- 0000-rust-script.md | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/0000-rust-script.md b/0000-rust-script.md index f08d405..3015a9a 100644 --- a/0000-rust-script.md +++ b/0000-rust-script.md @@ -13,9 +13,11 @@ The rust-script plugin for Cargo is expected to be a start point for expediting 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 tha simplicity can be attained for certain subsets of development activities. +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 use cases does it support? What is the expected outcome? +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 @@ -46,28 +48,29 @@ 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 posibility 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. @@ -75,6 +78,16 @@ Please also take into consideration that rust sometimes intentionally diverges f # 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? From 19e306d00c1709c2c0f8d02dfbdec91a5f711082 Mon Sep 17 00:00:00 2001 From: "L. Davison" Date: Fri, 29 Jul 2022 10:57:20 -0700 Subject: [PATCH 3/6] Update 0000-rust-script.md --- 0000-rust-script.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/0000-rust-script.md b/0000-rust-script.md index 3015a9a..45a5306 100644 --- a/0000-rust-script.md +++ b/0000-rust-script.md @@ -62,11 +62,11 @@ The section should return to the examples given in the previous section, and exp # Prior art [prior-art]: #prior-art -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. + * 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. Next we will generically discuss this prior art, both the good and the bad, in relation to this proposal. From 48d3fb1f8b0f9db485170390eb66d7e228fc2b00 Mon Sep 17 00:00:00 2001 From: "L. Davison" Date: Thu, 1 Sep 2022 07:27:40 -0700 Subject: [PATCH 4/6] fix: Check in orig --- 0000-rust-script.md | 54 ++++++++++++++------------------------------- 1 file changed, 17 insertions(+), 37 deletions(-) diff --git a/0000-rust-script.md b/0000-rust-script.md index 45a5306..81d2b36 100644 --- a/0000-rust-script.md +++ b/0000-rust-script.md @@ -1,29 +1,21 @@ -- Feature Name: Rust-script extension for Cargo -- Start Date: 7-29-2022 -- RFC PR: TBD -- Rust Issue: TBD +- 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) # Summary [summary]: #summary -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. +One paragraph explanation of the feature. # Motivation [motivation]: #motivation -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. +Why are we doing this? What use cases does it support? What is the expected outcome? # 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. @@ -48,29 +40,28 @@ The section should return to the examples given in the previous section, and exp # Drawbacks [drawbacks]: #drawbacks -1. Conflicting work and projects -2. Cargo evolutional conflicts -3. The posibility to confuse or distract developers +Why should we *not* do this? # Rationale and alternatives [rationale-and-alternatives]: #rationale-and-alternatives -- 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 +- 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? # Prior art [prior-art]: #prior-art - * 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. +Discuss prior art, both the good and the bad, in relation to this proposal. +A few examples of what this can include are: -Next we will generically discuss this prior art, both the good and the bad, in relation to this proposal. +- 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. 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. @@ -78,16 +69,6 @@ Please also take into consideration that rust sometimes intentionally diverges f # 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? @@ -112,4 +93,3 @@ 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. - From be254fd6e01101c6f95a531e3fc5462620d345ef Mon Sep 17 00:00:00 2001 From: "L. Davison" Date: Thu, 1 Sep 2022 07:34:00 -0700 Subject: [PATCH 5/6] fix: Reinsert comments. --- 0000-rust-script.md | 54 +++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/0000-rust-script.md b/0000-rust-script.md index 81d2b36..45a5306 100644 --- a/0000-rust-script.md +++ b/0000-rust-script.md @@ -1,21 +1,29 @@ -- 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 +- 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. @@ -40,28 +48,29 @@ 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 posibility 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. @@ -69,6 +78,16 @@ Please also take into consideration that rust sometimes intentionally diverges f # 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? @@ -93,3 +112,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. + From 32b36cb3d577dac38bbccfd669c7078c9cf74271 Mon Sep 17 00:00:00 2001 From: "L. Davison" Date: Thu, 1 Sep 2022 07:42:24 -0700 Subject: [PATCH 6/6] fix: Fix typo. --- 0000-rust-script.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/0000-rust-script.md b/0000-rust-script.md index 45a5306..b908218 100644 --- a/0000-rust-script.md +++ b/0000-rust-script.md @@ -50,7 +50,7 @@ The section should return to the examples given in the previous section, and exp 1. Conflicting work and projects 2. Cargo evolutional conflicts -3. The posibility to confuse or distract developers +3. The possibility to confuse or distract developers # Rationale and alternatives [rationale-and-alternatives]: #rationale-and-alternatives