Skip to content

Commit 3919a5f

Browse files
authored
third_party: remove unused picohttpparser (#1972)
docs: describe dependency management in contribution guide
1 parent 5d524c9 commit 3919a5f

File tree

6 files changed

+40
-31
lines changed

6 files changed

+40
-31
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,3 @@
5252
path = third_party/execution-apis
5353
url = https://github.com/ethereum/execution-apis.git
5454
branch = main
55-
[submodule "picohttpparser"]
56-
path = third_party/picohttpparser/picohttpparser
57-
url = https://github.com/h2o/picohttpparser

docs/CONTRIBUTING.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,43 @@ Apart from the submodules and some auxiliary directories, Silkworm contains the
7070
<br /> This module allows the `core` the run on WebAssembly. This module depends on both the `core` and `node` modules.
7171

7272

73+
## Dependency Management
74+
75+
Silkworm uses [Conan 1.x][conan] as package manager, but also relies on Git submodules for some libraries.
76+
77+
### Conan
78+
79+
If you need to add/remove/update any library managed in Conan, just edit the Silkworm [Conan recipe][silkworm-conan].
80+
81+
### Submodules
82+
83+
Silkworm uses also some 3rd-party libraries kept as Git submodules in [third-party][silkworm-third_party] folder.
84+
85+
#### Add
86+
87+
If you need to add library `lib` to Silkworm submodules, the following procedure must be applied:
88+
89+
1. mkdir third_party/<lib>
90+
2. git submodule add <github_repo_http_url> third_party/<lib>/<lib>
91+
3. add third_party/<lib>/CMakeLists.txt with library-specific build instructions (e.g. build options)
92+
4. update third_party/CMakeLists.txt
93+
94+
#### Remove
95+
96+
If you need to permanently remove library `lib` from Silkworm submodules, the following procedure must be applied:
97+
98+
1. git submodule deinit -f third_party/<lib>/<lib>
99+
2. git rm -rf third_party/<lib>
100+
3. update third_party/CMakeLists.txt
101+
4. rm -rf .git/modules/third_party/<lib>
102+
103+
#### Update
104+
105+
If you need to update library `lib` in Silkworm submodules to `commit_hash`, the following procedure must be applied:
106+
107+
1. cd third_party/<lib>/<lib>
108+
2. git checkout <commit_hash>
109+
73110
## Updating Snapshots
74111

75112
If you need to update the list of builtin snapshots in Silkworm, the following procedure must be applied:
@@ -163,12 +200,15 @@ Updating the version of Silkworm included in Erigon requires the following steps
163200
[silkworm-rpc]: https://github.com/erigontech/silkworm/tree/master/silkworm/rpc
164201
[silkworm-sync]: https://github.com/erigontech/silkworm/tree/master/silkworm/sync
165202
[silkworm-wasm]: https://github.com/erigontech/silkworm/tree/master/silkworm/wasm
203+
[silkworm-conan]: https://github.com/erigontech/silkworm/tree/master/conanfile.py
204+
[silkworm-third_party]: https://github.com/erigontech/silkworm/tree/master/third_party
166205
[silkworm-capi-header]: https://github.com/erigontech/silkworm/tree/master/silkworm/capi/silkworm.h
167206
[silkworm-go]: https://github.com/erigontech/silkworm-go
168207
[cpp-standard-iso]: https://isocpp.org
169208
[cpp-core-guidelines]: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines
170209
[cpp-google-style-guide]: https://google.github.io/styleguide/cppguide.html
171210
[ethereum-yellow-paper]: https://ethereum.github.io/yellowpaper/paper.pdf
211+
[conan]: https://conan.io
172212
[grpc]: https://grpc.io
173213
[erigon]: https://github.com/ledgerwatch/erigon
174214
[erigon-interfaces]: https://github.com/ledgerwatch/interfaces

silkworm/rpc/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ set(SILKWORM_RPCDAEMON_PUBLIC_LIBRARIES
4141
Boost::headers
4242
protobuf::libprotobuf
4343
intx::intx
44-
pico_http_parser
4544
)
4645

4746
# cmake-format: off

third_party/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ if(NOT SILKWORM_CORE_ONLY)
3131
add_subdirectory(erigon-mdbx-go)
3232
add_subdirectory(glaze)
3333
add_subdirectory(libtorrent)
34-
add_subdirectory(picohttpparser)
3534
add_subdirectory(sais-lite)
3635
add_subdirectory(stbrumme-crc32)
3736
add_subdirectory(stbrumme-keccak)

third_party/picohttpparser/CMakeLists.txt

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)