network-experiment/README.md

33 lines
2.0 KiB
Markdown

# Network experiment
This repository mostly contains personal experiments related to C++, CMake, conan, and some stuff that might end up on a raspberry pi. I have tried to rely mostly on development containers and almost no tools on the host. This should make it possible to build/develop/use this code on any machine that runs dev container, including ARM systems and Windows.
## How to use:
### Start developing
1. Clone the repository to a location of your liking.
2. Have an IDE that supports dev containers. I have used Visual studio code.
3. Open the project in your IDE, it should offer to open the project in a dev container.
Also take into consideration the following files:
1. ``dev-environment.json``
This file contains information about the type of build, the C++ version to use, and conan remotes used to retrieve packages.
2. ``.devcontainer/devcontainer.json``
Also contains configuration on plugins used (and some duplicated config on build type and C++ version).
### Building conan dependencies
Available in this repository is a ``dev-pre-conan-pkgs.Dockerfile`` that can be used to build all the conan dependencies and upload them to a remote.
1. Use dev-environment.json to configure the remotes (Where retrieve info, where to upload binaries).
2. Build the docker image using the following command:
``docker build -t tmp_bldconan -f dev-prep-conan-pkgs.Dockerfile .``
3. Run using the image to build & upload packages:
``docker run -ti tmp_bldconan``
- While running a username and password will be required to login.
- Do not forget to remove the image if you do not need it anymore.
Building conan packages for other architectures is also possible using "buildx". See external documentation on how to setup this feature. When setup, the following commands can be used to build for 32 bit ARM (useful for raspberry pi).
- ``docker buildx build -t tmp_bldconan_arm32 -f dev-prep-conan-pkgs.Dockerfile . --load --platform=linux/arm``
- ``docker run -ti --platform linux/arm tmp_bldconan_arm32``