cita 源碼研究

適用環境 vim + YouCompleteMe

  1. 使用 github 源,不能使用 ustc 源
git clone --depth 1 --recusive https://github.com/kt10/cita.git
  1. 全部 Cargo.toml 中的庫版本號所有改成精確的細版本號,不能是粗略的大版本號
  2. 全部 Cargo.toml 中的非官方託管庫,均改成 { path = "/PATH/TO/LIB" } 形式
  3. 第 二、3 兩步提到的 Cargo.toml 可以使用項層目錄中的 toml-replace.sh 腳本批量替換
  4. 編譯過程當中可能會出現庫依賴錯誤,根據提示安裝 google-perftools、libsodium、snappy、lz四、zeromq 等便可,尤爲注意 lz4 庫必須是靜態編譯,由於 cita 使用的 rdkafka 是 2017-09-15 的老版本,須要靜態連接 lz4
cargo build --all [--release]
相關文章
相關標籤/搜索