Coding guidelines - PurpleI2P/i2pd GitHub Wiki
- Files from libi2pd must not depend on files from libi2pdclient and i2pd. Files from libi2pdclient can depend on files from libi2pd but not on i2pd. You can find it in the fileslist.mk
- You can use C++17, but make sure code is buildable by gcc 7
- Don't reinvent a wheel. Try to find appropriate solution in std or boost. If a feature is presented in both, use std.
- Don't bring any additional dependency without discussion. However boost, openssl and zlib can be used in any amount.
- No requirements for formatting or coding style. You can do whatever you like.
- When you work with binary data, mind endianess. Use functions from I2PEndian.h
- No code produced by LLM is allowed
Coding styleguide
While it is not strictly required, most of the code is indented with tabs. If you use vim, you may want to add this line to your .vimrc:
autocmd BufNewFile,BufRead /home/user/lab/i2pd/*{cpp,h} set noet ts=4 sw=4