1# Contributing to Picolibc 2 3We welcome contributions of all forms, including patches to code and 4documentation, issue reports, or just kind words. 5 6## Getting Current Source Code 7 8Picolibc sources are maintained in git and hosted in two places. 9 10 1. [keithp.com](https://keithp.com/cgit/picolibc.git/). This is the 11 'canonical' source location. 12 13 2. [github](https://github.com/keith-packard/picolibc). This should 14 exactly mirror the code at keithp.com. I've placed it here to 15 make contributing to Picolibc easier for people familiar with github. 16 17You can create a local copy of the repository with git clone: 18 19 $ git clone git://keithp.com/git/picolibc.git 20 21or 22 23 $ git clone https://github.com/keith-packard/picolibc.git 24 25## Meson 26 27Picolibc uses the [meson](https://mesonbuild.com/) build tool. You'll 28need to make sure that's installed before you start trying to build 29the software. 30 31## Building Picolibc from Source 32 33As Picolibc is designed to be used for embedded systems, getting that 34configured correctly can be a challenge. Learn more about that in the 35[build](doc/build.md) page. 36 37## Formatting Source Code 38 39Picolibc code comes from a multitude of sources using an enormous 40range of styles. As picolibc tries to retain compatibility with newlib 41so that bug fixes can be shared between projects, we can't easily 42reformat all of the existing code. Here are suggestions on how to 43preserve compatibility while still being able to write readable code: 44 45 1. Whitespace-only changes are not helpful, please don't submit 46 changes that are only fixing formatting. 47 48 2. Try to adopt local coding styles as much as you can manage by 49 matching code within the same files. 50 51 3. For brand-new files, please use the global .editorconfig settings 52 if possible: 53 54 * no literal tab characters, only spaces 55 * 4-space indentation for nested elements 56 * no trailing whitespace 57 * utf-8 encoding 58 59## Patch Submission 60 61You can submit patches in a couple of ways: 62 63 1. Mail to the picolibc list (see below). This can be tricky as it 64 requires a friendly email system, and you'll have to subscribe to 65 the mailing list before it will let you post anything 66 (sigh). Here's a simple example sending the latest patch in your 67 local repository to the list: 68 69 $ git send-email --to picolibc@keithp.com HEAD^ 70 71 2. Generate a pull-request in github. 72 73 1. Fork the picolibc project into your own github account 74 2. Push patches to that repository 75 3. While viewing your repository, click on the 'New pull request' 76 button and follow the instructions there. 77 78## Issue Tracking 79 80We're using the issue tracker on Github for now; if you have issues, 81please submit them to the 82[Picolibc Issue Tracker](https://github.com/keith-packard/picolibc/issues) 83 84## Mailing List 85 86Picolibc has a mailing list, hosted at keithp.com. You can 87[subscribe here](https://keithp.com/mailman/listinfo/picolibc). 88This is a public list, with public archives. Participants are expected 89to abide by the [Picolibc Code of Conduct](CODE_OF_CONDUCT.md). 90 91## Code of Conduct 92 93Picolibc uses the [Contributor Covenant](https://www.contributor-covenant.org/), 94which you'll find in the source tree as [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md). 95Please help make picolibc a kind and welcoming environment by following 96those rules. 97