CONTRIBUTING.md 2.0 KB
Newer Older
1 2
Contributing to the Flutter engine
==================================
A
Adam Barth 已提交
3

4
[![Build Status](https://api.cirrus-ci.com/github/flutter/engine.svg)][build_status]
A
Adam Barth 已提交
5

6
_See also: [Flutter's code of conduct][code_of_conduct]_
I
Ian Hickson 已提交
7 8 9 10

Welcome
-------

11 12
For an introduction to contributing to Flutter, see [our contributor
guide][contrib_guide].
I
Ian Hickson 已提交
13

14 15 16 17 18
For specific instructions regarding building Flutter's engine, see [Setting up
the Engine development environment][engine_dev_setup] on our wiki. Those
instructions are part of the broader onboarding instructions described in the
contributing guide.

19 20 21 22
### Style

The Flutter engine follows Google style for the languages it uses:
- [C++](https://google.github.io/styleguide/cppguide.html)
23 24 25
  - **Note**: The Linux embedding generally follows idiomatic GObject-based C style.
    Use of C++ is discouraged in that embedding to avoid creating hybrid code that
    feels unfamiliar to either developers used to working with GObject or C++ developers.
26
    For example, do not use STL collections or std::string. Exceptions:
27 28 29
      - C-style casts are forbidden; use C++ casts.
      - Use `nullptr` rather than `NULL`.
      - Avoid `#define`; for internal constants use `static constexpr` instead.
30 31 32 33
- [Objective-C](https://google.github.io/styleguide/objcguide.html) (including
  [Objective-C++](https://google.github.io/styleguide/objcguide.html#objective-c))
- [Java](https://google.github.io/styleguide/javaguide.html)

34
C/C++ and Objective-C/C++ files are formatted with `clang-format`, and GN files with `gn format`.
35

36
[build_status]: https://cirrus-ci.com/github/flutter/engine
37
[code_of_conduct]: https://github.com/flutter/flutter/blob/master/CODE_OF_CONDUCT.md
38
[contrib_guide]: https://github.com/flutter/flutter/blob/master/CONTRIBUTING.md
39
[engine_dev_setup]: https://github.com/flutter/flutter/wiki/Setting-up-the-Engine-development-environment
40

K
Kaushik Iska 已提交
41

42 43 44
### Fuchsia Contributions from Googlers

Googlers contributing to Fuchsia should follow the additional steps at: go/flutter-fuchsia-pr-policy.