@@ -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
75112If 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
0 commit comments