npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cpp-project-template

v1.4.3

Published

[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=racing-cpp-project-template&metric=alert_status&token=6933f085ef1f81f5a191ae512e7e27da57334ef9)](https://sonarcloud.io/summary/new_code?id=racing-cpp-project-template) [![Cov

Downloads

1,068

Readme

cpp-project-template

Quality Gate Status Coverage Code Smells

A template for C++ projects

Requirements:

  • Docker https://docs.docker.com/get-docker/ (do not miss post install steps: https://docs.docker.com/engine/install/linux-postinstall/)
  • Docker Compose v2 https://docs.docker.com/compose/install/
  • (Optional) Nvidia driver version >= 555 (e.g. 555.58.02)
  • (Optional) Nvidia container toolkit ( and afterwards run sudo systemctl restart docker) https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html

Useful links:

  • Conan documentation: https://docs.conan.io/en/latest/
  • oh-my-zsh plugins: https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins

Host setup

There are a few steps to perform before you can start.

  1. Create a JFrog Identity Token for your account.
    • Access ARRC's JFrog instance with your TII's GitLab account.
    • Go to the top-right corner > drop-down menu > Edit User Profile
    • Click on 'Generate an Identity Token'.
    • Save the token in a safe place, or just copy it (you won't see it again, you'll have to generate a new one if needed).
    • Use it as a password for Docker and Conan in the next steps.

Docker

Setup insecure docker registry (necessary until we get ssl certificates):

  1. Login to the Docker registry:
    docker login --username=<your-jfrog-username> repo.arrc.tii.ae
    # paste your Identity Token when prompted.

New project from template

These steps are to be performed only once, when creating a new project starting from this template.

  1. Clone the project template repository and its submodules:

    mkdir <project-name> && cd <project-name>
    git init
    git fetch --depth=1 -n [email protected]:tii-arrc/racing-bots/templates/cpp-project-template.git
    git reset --hard $(git commit-tree FETCH_HEAD^{tree} -m "initial commit")
    git submodule update --init

    or, if you already cloned the repository:

    git reset --hard $(git commit-tree FETCH_HEAD^{tree} -m "initial commit")
    git submodule update --init

    Create a main branch if it's not the default.

  2. Initialize the project folder

    ./common-helpers/scripts/update_commons.sh
  3. Change the values of the project-specific variables in the .env file:

    RDE_PROJ_NAME=<project-name>
    RDE_PROJ_BRIEF="A decent, but brief project description."
    RDE_PROJ_TYPE=cpp
    RDE_GROUP_NAME=<project-group-name>
    RDE_NVIDIA_ON=<true|false> # to enable NVIDIA support in the devcontainer.

Now you should be able to open your project as a devcontainer.

Project update

As the files in common-helpers will be updated over time, the respective submodule should be kept up-to-date with the upstream. To update the commmon helpers, run:

cd common-helpers/
git pull origin main
cd ..
git add common-helpers # [others...]
git commit -m "common-helpers update."

And run the VSCode command 'Rebuild Container Without Cache'.


Development workflow (Conan)

If the authentication info are not already stored in your cache (i.e. you never logged in with this user from another RDE container), login to the ARRC remote with the command:

conan user -p <your-jfrog-identity-token> -r arrc <your-jfrog-username>

In case this error comes up:

ERROR: No remote 'arrc' defined in remotes

it is a known issue due to the VSCode DevContainer plugin. A quick fix is to switch back to the extension version v0.275.1. This should be done on your host installation of VSCode, not inside the container.

The conan user command can be used without arguments to verify the authentication status. If authenticated correctly, the output should be similar to:

conan user

should produce:

Current user of remote 'conancenter' set to: 'None' (anonymous)
Current user of remote 'arrc' set to: '<your-jfrog-username>' [Authenticated]

Now you can install the project dependencies (specified in conanfile.py) and compile.

Install the package dependencies specified in the conanfile.py (recipe). Dependencies are pulled from the conancenter and arrc remotes, by default. Dependencies configurations for which a binary is not available can be built with the --build=missing option (good luck).

conan install . -pr:b=release # --build=missing

Build the package according to the build() method in the conan-rde.RDECmakePackage base recipe.

conan build .

Local package development

To work on more than one repositories in the dependency tree, you can create a conan package in your local cache and then reference it in the dependent package's conanfile.py.

Example (proj-a depends on proj-b): Create the proj-b package in the local cache. The configure, install, source, build, and other steps are called in the local conan cache. The produced package is tagget with local/dev user and cannel attributes.

conan create . proj-b/test@local/dev

Now you can access to the reference proj-b/test@local/dev in any other local project. This is possible because the conan cache is mounted as a named voulume in all the RDE containers. In ./proj-a/conanfile.py add the following line

class ProjAConan(ConanFile):
    # ...
    def requirements(self):
        # ...
        self.requires("proj-b/test@local/dev")