diff --git a/Package.swift b/Package.swift index 8562ecf8..d1c82fc8 100644 --- a/Package.swift +++ b/Package.swift @@ -386,10 +386,10 @@ let package = Package( "connections/c", "connections/dart", "connections/clients/ios", + "connections/README.md", "connections/swift/NearbyConnections", "connections/swift/NearbyCoreAdapter/BUILD", "connections/swift/NearbyCoreAdapter/Tests", - "docs", "internal/platform/implementation/g3", "internal/platform/implementation/apple/Tests", "internal/platform/implementation/apple/Mediums/Ble/Sockets/Tests", diff --git a/README.md b/README.md index 1f92a141..fc4717d6 100644 --- a/README.md +++ b/README.md @@ -1,65 +1,31 @@ -# Nearby C++ Library +# Nearby -The repository contains the Nearby project C++ library source code. This is not an -officially supported Google product. +Nearby is a collection of projects focused on connectivity that enable building cross-device experiences. -# About the Nearby Project +This is not an officially supported Google product. -## Nearby Connection -Nearby Connections is a high level protocol on top of Bluetooth/WiFi that acts -as a medium-agnostic socket. Devices are able to advertise, scan, and connect -with one another over any shared medium (eg. BT <-> BT). -Once connected, the two devices share a list of all supported mediums and -attempt to upgrade to the one with the highest bandwidth (eg. BT -> WiFi). -The connection is encrypted, reliable, and fully duplex. BYTE, FILE, and STREAM -payloads are all supported and will be chunked & transferred internally and -recombined on the receiving device. -See [Nearby Connections Overview](https://developers.google.com/nearby/connections/overview) -for more information. +## Projects -# Checkout the source tree +### [Nearby Connection](connections/) -```shell -git clone https://github.com/google/nearby -cd nearby -git submodule update --init --recursive -``` +A peer-to-peer networking API that allows apps to easily discover, connect to, and exchange data with nearby devices in real-time, regardless of network connectivity. -# Building Nearby, Unit Testing and Sample Apps -We support multiple platforms including Linux, iOS & Windows. -## Building for Linux -Currently we support building from source using [bazel] (https://bazel.build). Other BUILD system such as cmake may be added later. +### [Fast Pair](fastpair/) -### Prerequisites: +Utilizes Bluetooth Low Energy (BLE) to discover nearby Bluetooth devices without using significant phone battery, enabling "magical" scenarios based on device proximity. -1. Bazel -2. clang with support for c++ 17+ -3. Openssl libcrypto.so (-lssl;-lcrypto). +### [Nearby Presence](presence/) +An extension to Nearby Connections that features an extensible identity model for authentication and restricted visibility, resource management for system health, and proximity detection through sensor fusion. -To build the Nearby Connection Core library: +### [Nearby for Embedded Systems](embeded/) -```shell -CC=clang CXX=clang++ bazel build -s --check_visibility=false //connections:core --spawn_strategy=standalone --verbose_failures -``` +A lightweight implementation of Fast Pair intended for embedded systems. +## Contributing -## Building for macOS and iOS +We encourage you to contribute to Nearby! Please check out the [Contributing to Nearby guide](CONTRIBUTING.md) for guidelines about how to proceed. -Currently we support building with [Swift Package Manager](https://www.swift.org/package-manager). +## License -### Prerequisites: - -1. Xcode. Available from Apple Store. -2. Google Protobuf Compiler (protoc). If you have [homebrew](https://brew.sh/) installed, you can do `brew install protobuf`. - -To build the Nearby Connection library: - -```shell -swift build -``` - -### Limitation -The only Medium supported is Wifi LAN. - -**Last Updated:** December 7, 2022 +Nearby is released under the [Apache License 2.0](LICENSE) \ No newline at end of file diff --git a/connections/README.md b/connections/README.md new file mode 100644 index 00000000..95c8c2ba --- /dev/null +++ b/connections/README.md @@ -0,0 +1,61 @@ +# Nearby Connection + +Nearby Connections is a high level protocol on top of Bluetooth/WiFi that acts +as a medium-agnostic socket. Devices are able to advertise, scan, and connect +with one another over any shared medium (eg. BT <-> BT). +Once connected, the two devices share a list of all supported mediums and +attempt to upgrade to the one with the highest bandwidth (eg. BT -> WiFi). +The connection is encrypted, reliable, and fully duplex. BYTE, FILE, and STREAM +payloads are all supported and will be chunked & transferred internally and +recombined on the receiving device. +See [Nearby Connections Overview](https://developers.google.com/nearby/connections/overview) +for more information. + +# Checkout the source tree + +```shell +git clone https://github.com/google/nearby +cd nearby +git submodule update --init --recursive +``` + +# Building Nearby, Unit Testing and Sample Apps + +We support multiple platforms including Linux, iOS & Windows. + +## Building for Linux + +> **NOTE:** Linux has no mediums implemented. + +Currently we support building from source using [bazel] (https://bazel.build). Other BUILD system such as cmake may be added later. + +### Prerequisites: + +1. Bazel +2. clang with support for c++ 17+ +3. Openssl libcrypto.so (-lssl;-lcrypto). + + +To build the Nearby Connection Core library: + +```shell +CC=clang CXX=clang++ bazel build -s --check_visibility=false //connections:core --spawn_strategy=standalone --verbose_failures +``` + + +## Building for macOS and iOS + +> **NOTE:** The only medium supported is Wi-Fi LAN. + +Currently we support building with [Swift Package Manager](https://www.swift.org/package-manager). + +### Prerequisites: + +1. Xcode. Available from Apple Store. +2. Google Protobuf Compiler (protoc). If you have [homebrew](https://brew.sh/) installed, you can do `brew install protobuf`. + +To build the Nearby Connection library: + +```shell +swift build +```