diff options
| author | Stefan Boberg <[email protected]> | 2022-02-02 12:15:24 +0100 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2022-02-02 12:15:24 +0100 |
| commit | 720244dad98e68593550e989f8417614a5f35460 (patch) | |
| tree | eedff0bd107029570a44e91bd9885224a3b49f3a | |
| parent | Added some diagnostics to http.sys server to make it clear when we are listen... (diff) | |
| parent | Update CODING.md (diff) | |
| download | zen-720244dad98e68593550e989f8417614a5f35460.tar.xz zen-720244dad98e68593550e989f8417614a5f35460.zip | |
Merge branch 'main' of https://github.com/EpicGames/zen
| -rw-r--r-- | CODING.md | 16 | ||||
| -rw-r--r-- | README.md | 19 |
2 files changed, 29 insertions, 6 deletions
@@ -1,5 +1,15 @@ # Naming Conventions -* Classes/Structs - PascalCase -* Functions - CamelCase -* Class member variables - m_PascalCase +The naming conventions for Zen are intended to resemble the Unreal Engine coding style, with some minor exceptions. + +* Classes/Structs - `PascalCase` +* Functions - `PascalCase()` +* Class member variables - `m_PascalCase` + +Those who are familiar with the UE coding standards will note that we do not require or encourage `F` prefixes on struct or classes, and we expect class members to have a `m_` member prefix. + +# Code formatting + +To ensure consistent formatting we rely on `clang-format` to automatically format source code. This leads to consistent formatting which should lead to less surprises and more straightforward merging. + +Formatting is triggered via `prepare_commit` which should be used ahead of commit. We do not currently reject commits which have not been formatted, but we probably should at some point in the future. @@ -39,8 +39,11 @@ currently building with the VS2022 toolchain has not been tested (please leave t * clone the `zen` repository if you haven't already * run `git clone https://github.com/EpicGames/zen.git` * run `xmake project -k vsxmake2019 -a x64 -y` -* open the `vsxmake2019\zen.sln` VS solution (NOTE: you currently need to run Visual Studio in ADMIN mode since - http.sys requires elevation) +* open the `vsxmake2019\zen.sln` VS solution + * Note: if you want full connectivity with the http.sys server implementation you currently need to run + Visual Studio in ADMIN mode since http.sys requires elevation to be able to listen on a non-local network socket. + You can start Visual Studio in admin mode by holding CTRL-SHIFT when launching Visual Studio. Alternatively + you can add an URL reservation (see below) * you can now build and run `zenserver` as usual from Visual Studio * third-party dependencies will be built the first time via the `vcpkg` integration. This is not as fast as it could be (it does not go wide) but should only happen on the first build and will leverage @@ -193,9 +196,19 @@ is incredibly handy. When that is installed you may enable auto-attach to child The tests are implemented using [doctest](https://github.com/onqtam/doctest), which is similar to Catch in usage. +# Adding a http.sys URL reservation + +Registering a handler for an HTTP endpoint requires either process elevation (i.e running Zen as admin) or a one-time URL reservation. An URL reservation can be added by issuing a command like + +`netsh http add urlacl url=http://*:1337/ user=stefan.boberg` (enable for a specific user) + +or + +`netsh http add urlacl url=http://*:1337/ sddl=D:(A;;GX;;;S-1-1-0)` (enable for any authenticated user) + # Coding Standards -See [Coding.md](Coding.md) +See [CODING.md](CODING.md) Run `prepare_commit.bat` before committing code. It ensures all source files are formatted with clang-format which you will need to install. |