Viam C++ SDK current
|
Warning This is a beta release of the Viam C++ SDK. Stability is not guaranteed. Breaking changes are likely to occur, and occur often.
src/viam/sdk
The implementation of the C++ sdk librarysrc/viam/api
All the google and viam api autogen filessrc/viam/examples
A list of examplesPlease see BUILDING.md for instructions on how to use CMake-based build system for this project.
NOTE: Windows is not supported. If you are using Windows, build the project in WSL.
A Docker description is included which will install the required packages.
docker build -t cpp . -f etc/docker/Dockerfile.debian.bullseye
(other files are provided for Ubuntu Focal and Ubuntu Jammy as well as Debian Sid). Run the new image in a container that has your local project directory mounted to the filesystem. This will ensure that you can continue to develop locally on your machine, and all files will be automatically synced into the docker environment. To create the environment and open a shell to it, run the command docker run --rm -it -v "$PWD":/usr/src/viam-cpp-sdk -w /usr/src/viam-cpp-sdk cpp /bin/bash
The C++ sdk uses Doxygen to generate documentation. An automated workflow will generate and update our documentation on each merge, and publish it to cpp.viam.dev.
Generating documentation locally to observe changes while developing with the C++ SDK is simple. First, make sure doxygen is installed, e.g.,
Next, generate the documentation. From the SDK root, run:
That will run doxygen Doxyfile
and create the etc/docs/api/current
folder. Then simply open the index.html
file in your preferred browser to view the documentation.
The rust webRTC implementation (which C++ relies on via rust's foreign function interface) is still new, and liable to have bugs. At a minimum, we expect that calls to ShellService::shell()
have a high likelihood of strange behavior. If you encounter any issues with streaming requests over webRTC, direct dial (by disabling webrtc as above) should resolve them. And please file a bug report! We will endeavor to be as responsive as possible, and resolve issues as quickly as possible.
Copyright 2022 Viam Inc.
Apache 2.0 - See LICENSE file