Would it be useful to provide a pre-defined development environment as a devcontainer? #4122
MusicalNinjaDad
started this conversation in
Polls
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
To make my life easier when contributing to Pyo3 I put together a devcontainer with the required development tools, python headers etc.
For those who are not aware Development Containers are a combination of a Dockerfile and a configuration json which provide a full development environment in a Docker container for a specific project. They are very well integrated with VSCode, intelliJ and are the backbone of github codespaces.
To use one you just need to install docker on your system and the relevant extension in your IDE. The system will then download/build and run a container with rust, python, python headers, nox, lychee, llvm-cov, ... and automatically install the relevant add-ons in your IDE (rust-analyzer, ruff, etc.) While that may sound complex the developer ergonmics are phenomenal and it is soooo much easier than manually installing and experimenting based on high-level info in contributing.md
This keeps your underlying system "clean" of all the specific toolchain requirements for any OSS project and makes it really easy to get up and running with a well-installed development environment.
There are two basic ways to provide a container:
projectroot/pyo3
rather thanpyo3
being the project rootI'm happy to share my container with better documentation or to offer it here as a PR, if that would be valuable to the community. It's currently at MusicalNinjaDad/devcontainers-python-rust
I hope I'm not stepping on log-term contributors and maintainers toes with this poll. If I am, please let me know and I'll back off...
1 vote ·
Beta Was this translation helpful? Give feedback.
All reactions