|
3 | 3 | ## Overview |
4 | 4 |
|
5 | 5 | Please err on the side of high quality, not lazy, implementation decisions, because the code |
6 | | -will have to be maintained for a long time. And everybody, LLM or person, is able to work |
| 6 | +will have to be maintained for a long time. Everybody, LLM or person, is able to work |
7 | 7 | better if we keep the code clean and to a high standard to start with. |
8 | 8 |
|
9 | 9 | Even if your instructions don't include specific admonishment about quality, it is always |
10 | | -necessary. |
| 10 | +necessary. Lws started in 2010 the main goal when working on a feature is to |
| 11 | +improve the library with the feature. That means shortcuts and desperate |
| 12 | +incomplete hacks to deliver the feature are always wrong. |
11 | 13 |
|
12 | 14 | Our work should follow the existing usage of apis in the project as much as possible. |
13 | 15 |
|
@@ -54,14 +56,17 @@ We are very concerned about security, architecturally and in the code. We avoid |
54 | 56 |
|
55 | 57 | - `FILE *` and use apis like open(), read(). |
56 | 58 |
|
57 | | - - casual linked-lists and use `lws_dll2_t`. |
| 59 | + - hand-rolled ad-hoc code when there are library helpers, eg no casual |
| 60 | + linked-lists; use `lws_dll2_t` instead. |
58 | 61 |
|
59 | 62 | We consider using: |
60 | 63 |
|
61 | 64 | - lwsac instead of discrete allocations, if the pattern of allocations will benefit from it. |
62 | 65 |
|
63 | 66 | - lws_struct to convert between sqlite storage <-> structs <-> JSON |
64 | 67 |
|
| 68 | + - lws_tokenize instead of strtok() and variants |
| 69 | + |
65 | 70 | We are very concerned about portability and all builds occur with -Werror -Wall -Wextra. |
66 | 71 |
|
67 | 72 | ## Appropriate locality |
@@ -109,7 +114,7 @@ commands for the platform. |
109 | 114 |
|
110 | 115 | minimal-examples-lowlevel/http-client/minimal-http-client-post/CMakeLists.txt shows how to use the fixtures |
111 | 116 | stuff to magic peers into being while being sensitive to parallel CI using a CMake unique socket allocator |
112 | | -function to make unique ports. |
| 117 | +function to select unique ports. |
113 | 118 |
|
114 | 119 | In the case you can build and run ctest meaningfully, please do confirm the build passes before completing |
115 | 120 | work on your goal. Use parallel builds and eg, ctest -j8 to reduce the cost in realtime. |
0 commit comments