This repository contains code samples and presentation slides shown during C++ meetup on January 16th, 2020.
Slides are created with markdown and compiled to HTML using Marpit.
Presentation video (click the image to open video on youtube):
This repository contains some files on LFS, so make sure that you have Git LFS support installed prior cloning this repository. Without this, code examples will not work.
Live demo of the example is available on this link
You will need CMake, Ninja and Conan installed on your computer and available in your PATH
. If running on windows, please use a bash shell.
-
Run the
bootstrap-emscripten-conan.sh
script - it will setup your conan environment for development with emscripten, download the Emscripten conan package and generate anactivate.sh
shell script that will setup your shell for emscripten development (similar to how python virtualenv works). -
Activate the Emscripten environment
source ./activate.sh
-
Create and enter an empty build directory
mkdir build && cd build
-
Initialize the cmake build directory
ecmake -DCMAKE_BUILD_TYPE=Release ..
-
Build the code
ninja
or
cmake --build .
-
Serve the
bin
directory with simple HTTP server.python3 -m http.server --directory ./bin 8080
-
Navigate your browser to
http://localhost:8080
and allow camera access. -
Note: The camera access will work only on
localhost
. If you want other users to have access to the camera, you will need to serve the directory via HTTPS, as most browsers do not allow camera access for non-secure contexts.