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

RFC: Streamlined UX #36

Merged
merged 8 commits into from
Jul 2, 2021
Merged

RFC: Streamlined UX #36

merged 8 commits into from
Jul 2, 2021

Conversation

dherman
Copy link
Contributor

@dherman dherman commented Sep 17, 2020

This RFC proposes streamlining the directory layout and command-line UX of Neon projects, making the design simpler, more intuitive, and easier to learn and adopt.

In particular, starting a new Neon project looks like:

$ npm init neon my-project
...
✨ Created Neon project my-project. Happy 🦀 hacking! ✨
$ cd my-project
$ npm install
$ node -e 'console.log(require(".").hello())'
hello node

And the directory layout is flattened and simplified to:

my-project/
├── .gitignore
├── Cargo.toml
├── README.md
├── package.json
└── src
    └── lib.rs

Rendered RFC

This RFC proposes making it possible to use Neon with only standard CLI tools: `npm` for JavaScript workflows, and `cargo` for Rust workflows. This should lighten the cognitive burden of learning Neon, make it easier to learn, and generally feel like an even simpler end-to-end user experience.
Copy link
Member

@kjvalencik kjvalencik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something we may want to consider adding to this scope is making the fn build function for N-API part of the neon module.

It has zero dependencies and would allow users to use neon with only neon in their Cargo.toml.

I'm not sure how to accomplish it, but it would also be neat if building neon would fail with a helpful message if the user was missing a build.rs. This could allow for a workflow where users can cargo add neon and "follow the compiler."

text/0000-native-cli.md Outdated Show resolved Hide resolved
text/0000-native-cli.md Outdated Show resolved Hide resolved
text/0000-native-cli.md Outdated Show resolved Hide resolved
text/0000-native-cli.md Outdated Show resolved Hide resolved
text/0000-native-cli.md Outdated Show resolved Hide resolved
text/0000-native-cli.md Outdated Show resolved Hide resolved
text/0000-native-cli.md Outdated Show resolved Hide resolved
@goto-bus-stop goto-bus-stop changed the base branch from master to main October 8, 2020 13:45
@dherman dherman changed the title RFC: Native CLI UX RFC: Streamlined UX Feb 24, 2021
text/0000-native-cli.md Outdated Show resolved Hide resolved
text/0000-native-cli.md Outdated Show resolved Hide resolved
text/0000-native-cli.md Outdated Show resolved Hide resolved
- Remove `build.rs` from generated files list
- Distinguish files generated by `npm init neon` from files generated by the build
- Add `.gitignore`
@dherman
Copy link
Contributor Author

dherman commented Feb 28, 2021

@kjvalencik Thanks for the review, I addressed all your feedback.

@dherman dherman added the final comment period last opportunity to discuss the proposed conclusion label Mar 11, 2021
@dherman dherman merged commit ea97c18 into main Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
final comment period last opportunity to discuss the proposed conclusion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants