Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
examples/ | 07-May-2024 | - | 3,421 | 2,633 | ||
include/weave/ | 07-May-2024 | - | 1,868 | 959 | ||
src/ | 07-May-2024 | - | 22,272 | 17,195 | ||
third_party/ | 07-May-2024 | - | 35,154 | 24,060 | ||
.clang-format | D | 07-May-2024 | 225 | 9 | 8 | |
.gitignore | D | 07-May-2024 | 105 | 8 | 7 | |
AUTHORS | D | 07-May-2024 | 310 | 8 | 7 | |
Android.mk | D | 07-May-2024 | 4.3 KiB | 149 | 97 | |
CONTRIBUTORS | D | 07-May-2024 | 1 KiB | 30 | 28 | |
LICENSE | D | 07-May-2024 | 1.5 KiB | 27 | 22 | |
Makefile | D | 07-May-2024 | 2.4 KiB | 109 | 75 | |
README.md | D | 07-May-2024 | 2.6 KiB | 168 | 116 | |
file_lists.mk | D | 07-May-2024 | 6.4 KiB | 168 | 153 | |
libweave-test.pc.in | D | 07-May-2024 | 136 | 8 | 6 | |
libweave.pc.in | D | 07-May-2024 | 136 | 8 | 6 | |
tests.mk | D | 07-May-2024 | 2.2 KiB | 69 | 43 |
README.md
1# Overview 2 3libWeave is the library with device side implementation of Weave protocol. 4 5# Sources 6 7Sources are located in git repository at 8https://weave.googlesource.com/weave/libweave/ 9 10 11# Install Repo 12 13Make sure you have a bin/ directory in your home directory 14and that it is included in your path: 15 16``` 17mkdir ~/bin 18PATH=~/bin:$PATH 19``` 20 21Download the Repo tool and ensure that it is executable: 22 23``` 24curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo 25chmod a+x ~/bin/repo 26``` 27 28# Checkout code 29 30``` 31repo init -u https://weave.googlesource.com/weave/manifest 32repo sync 33``` 34 35# Directory structure 36 37| Path | Description | 38|--------------------------|------------------------------------| 39| include/ | Includes to be used by device code | 40| src/ | Implementation sources | 41| examples/ | Example of device code | 42| third_party/ | Dependencies | 43| Makefile, \*.mk files | Build files | 44 45 46# Quick start on Debian/Ubuntu 47 48### Install prerequisites 49 50``` 51sudo apt-get update 52sudo apt-get install \ 53 autoconf \ 54 automake \ 55 binutils \ 56 g++ \ 57 hostapd \ 58 libavahi-client-dev \ 59 libcurl4-openssl-dev \ 60 libevent-dev \ 61 libexpat1-dev \ 62 libnl-3-dev \ 63 libnl-route-3-dev \ 64 libssl-dev \ 65 libtool 66``` 67 68# Prerequisites 69 70### Common 71 72 - autoconf 73 - automake 74 - binutils 75 - libtool 76 - libexpat1-dev 77 78### For tests 79 80 - cmake 81 - gtest (included; see third_party/get_gtest.sh) 82 - gmock (included; see third_party/get_gtest.sh) 83 84### For examples 85 86 - cmake 87 - hostapd 88 - libavahi-client-dev 89 - libcurl4-openssl-dev 90 - libevhtp (included; see third_party/get_libevhtp.sh) 91 - libevent-dev 92 93 94# Compiling 95 96The `make --jobs/-j` flag is encouraged, to speed up build time. For example 97 98``` 99make -j 100``` 101 102which happens to be the same as 103 104``` 105make all -j 106```` 107 108### Build library 109 110``` 111make out/Debug/libweave.so 112``` 113 114### Build examples 115 116``` 117make all-examples 118``` 119 120See [the examples README](/examples/daemon/README.md) for details. 121 122# Testing 123 124### Run tests 125 126``` 127make test 128make export-test 129``` 130 131or 132 133``` 134make testall 135``` 136 137# Making changes 138 139### Configure git 140Make sure to have correct user in local or global config e.g.: 141 142``` 143git config --local user.name "User Name" 144git config --local user.email user.name@example.com 145``` 146 147### Start local branch 148 149``` 150repo start <branch name> . 151``` 152 153### Edit code and commit locally e.g. 154 155``` 156git commit -a -v 157``` 158 159### Upload CL 160 161``` 162repo upload . 163``` 164 165### Request code review 166 167Go to the url from the output of "repo upload" and add reviewers. 168