diff --git a/.gitignore b/.gitignore index 7df89a2fc..38f662d90 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,7 @@ Cargo.lock # rattler .prefix + +# pixi +.pixi/ +pixi.lock diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..85ba0b8ef --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,31 @@ +# Contributing 😍 + +We would love to have you contribute! +For a good list of things you could help us with, take a look at our [*good first issues*](https://github.com/mamba-org/rattler/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). +If you want to go deeper though, any [open issue](https://github.com/mamba-org/rattler/issues) is up for grabs. +Just let us know what you start on something. + +For questions, requests or a casual chat, we are very active on our discord server. +You can [join our discord server via this link][chat-url]. + +## Development +If you'd like to contribute code, then you may want to manage the build depends with a tool, we suggest pixi, but conda/mamba will also work. + +### Virtual env with pixi +You can use [pixi](https://github.com/prefix-dev/pixi) for setting up the environment needed for building and testing rattler, (as a fun fact, pixi uses rattler as a dependency!). The spec in `pixi.toml` in the project root will set up the environment. After installing, run the install command from the project root directory, shown below. +```sh +❱ pixi install # installs dependencies into the virtual env +❱ pixi run build # calls "build" task specified in pixi.toml, "cargo build", using cargo in pixi venv +``` + +### Virtual env with conda/mamba +The environment can also be managed with conda using the spec in `environments.yml` in the project root. +As below, +```sh +❱ mamba create -n name_of_your_rattler_env --file='environments.yml' && mamba activate name_of_your_rattler_env +❱ cargo build # uses cargo from your mamba venv +❱ mamba deactivate # don't forget you're in the venv +``` + + + diff --git a/README.md b/README.md index 02b93f79c..eaeecea87 100644 --- a/README.md +++ b/README.md @@ -72,11 +72,9 @@ Try it! ## Contributing 😍 We would love to have you contribute! -For a good list of things you could help us with, take a look at our [*good first issues*](https://github.com/mamba-org/rattler/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). -If you want to go deeper though, any [open issue](https://github.com/mamba-org/rattler/issues) is up for grabs. -Just let us know what you start on something. +See the CONTRIBUTION.md for more info. For questions, requests or a casual chat, we are very active on our discord server. +You can [join our discord server via this link][chat-url]. -For questions, requests or a casual chat, we are very active on our discord server. You can [join our discord server via this link][chat-url]. ## Components diff --git a/pixi.toml b/pixi.toml new file mode 100644 index 000000000..6b7c4034f --- /dev/null +++ b/pixi.toml @@ -0,0 +1,20 @@ +[project] +name = "rattler" +version = "0.7.0" +description = "Rust library to install conda environments" +authors = ["Wolf Vollprecht ", "Bas Zalmstra ", "Tim de Jager ", "Ruben Arts "] +channels = ["conda-forge"] +platforms = ["linux-64", "win-64", "osx-64", "osx-arm64"] + +[tasks] +build = "cargo build" +fmt = "cargo fmt" +lint = "cargo clippy" + +[dependencies] +cxx-compiler = "~=1.6.0" +openssl = "~=3.1.2" +make = "~=4.3" +pkg-config = "~=0.29.2" +rust = "~=1.71.1" +cmake = "~=3.26.4"