i2pd_docs_zh/docs/about/contributing.md

18 lines
808 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

贡献
============
编码指南
----------------
1. 依赖关系
- `libi2pd` 中的文件不得依赖 `libi2pdclient``i2pd` 中的文件。
- `libi2pdclient` 中的文件可以依赖 `libi2pd`,但不能依赖 `i2pd`
你可以在 `fileslist.mk` 中找到相关信息。
2. 你可以使用 C++11但请确保代码能用 `gcc 4.6` 构建。
3. 不要重复造轮子。
- 尽量在 std 或 boost 中寻找合适的解决方案。
- 如果 std 和 boost 都提供该功能,优先使用 std。
5. 未经讨论不要引入任何额外依赖。
- 不过可以任意使用 `boost`、`openssl` 和 `zlib`
7. 对格式或编码风格没有要求。你可以按你喜欢的方式来。
8. 处理二进制数据时要注意大小端问题。请使用 `I2PEndian.h` 中的函数。