{"id":29791766,"url":"https://github.com/scar027/data-structures","last_synced_at":"2025-07-28T00:34:17.796Z","repository":{"id":306832097,"uuid":"1027342796","full_name":"scar027/data-structures","owner":"scar027","description":"Library containing documented implementations of internal workings of commonly used data structures.","archived":false,"fork":false,"pushed_at":"2025-07-27T21:27:40.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-27T23:17:22.300Z","etag":null,"topics":["cmake","cpp","ctest","data-structures","doxygen","rtd","rtfd","sphinx"],"latest_commit_sha":null,"homepage":"https://data-structures-docs.readthedocs.io/en/latest/index.html","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scar027.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-27T20:30:36.000Z","updated_at":"2025-07-27T21:35:07.000Z","dependencies_parsed_at":"2025-07-27T23:17:24.387Z","dependency_job_id":"88c67b4a-0c1c-42db-a94a-4cf28fa646b9","html_url":"https://github.com/scar027/data-structures","commit_stats":null,"previous_names":["scar027/data-structures"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/scar027/data-structures","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scar027%2Fdata-structures","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scar027%2Fdata-structures/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scar027%2Fdata-structures/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scar027%2Fdata-structures/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scar027","download_url":"https://codeload.github.com/scar027/data-structures/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scar027%2Fdata-structures/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267446932,"owners_count":24088563,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmake","cpp","ctest","data-structures","doxygen","rtd","rtfd","sphinx"],"created_at":"2025-07-28T00:34:17.324Z","updated_at":"2025-07-28T00:34:17.788Z","avatar_url":"https://github.com/scar027.png","language":"C++","readme":"# data-structures\nLibrary containing documented implementations of internal workings of commonly used data structures.\n\nThe currently implemented data structures available in [include/data_structures/](./include/data_structures) are:\n1. Dynamic Arrays.\n1. Singly Linked Lists.\n1. Doubly Linked Lists.\n1. Stack.\n1. Queue.\n1. Circular Array.\n1. Deque.\n\n## Flags to be set while configuring the library\n1. Use `--preset` to set your compiler for the build(GCC, Clang, MSVC).\n1. `CMAKE_INSTALL_PREFIX` - Path where you want your library to be installed.\n1. `ENABLE_STRICT_FLAGS` - To enable the strict warning flags from [GCCWarnings.cmake](./cmake/GCCWarnings.cmake), [ClangWarnings.cmake](./cmake/ClangWarnings.cmake) or [MSVCWarnings.cmake](./cmake/MSVCWarnings.cmake)\n1. `CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON` for shared library Windows installation. Windows will require you to explicitly put the `.dll` either to the same folder where the executable is or somewhere in PATH.\n1. `BUILD_TESTING=ON` to build the tests for the library.\n1. `BUILD_DOC=ON` for building the documentation.\n\n## Requirements to build the documentation\nThe documentation relies on Doxygen, Breathe and Sphinx.\n1. Installation instructions for Doxygen and Sphinx can be found here:\n    1. [Doxygen](https://www.doxygen.nl/manual/install.html)\n    1. [Sphinx](https://www.sphinx-doc.org/en/master/usage/installation.html)\n1. Breathe and the Read the Docs Sphinx Theme can be downloaded system-wide with the following command on Linux:\n    ```bash\n    sudo apt install python3-breathe python3-sphinx-rtd-theme python3-exhale\n    ```\n    You may also choose to create a virtual environment and use these packages instead.\n\n## Configuring and generating the library\n1. Follow these steps from the root directory of the library to configure the project.\n    ```bash\n    mkdir build\n    cd build\n    ```\n2. To configure, run the following from the build directory with the appropriate compiler mentioned in the `--preset` flag:\n    ```bash\n    cmake --preset=gcc -DCMAKE_INSTALL_PREFIX=\"/path/to/install/directory\" -DENABLE_STRICT_FLAGS=ON ..\n    ```\n    For Windows:\n    ```bash\n    cmake --preset=msvc -DCMAKE_INSTALL_PREFIX=\"C:/your/install/path\" -DENABLE_STRICT_FLAGS=ON -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON ..\n    ```\n    **Note:** Add the `BUILD_DOC=ON` flag to the above to build the documentation and the `BUILD_TESTING=ON` for the tests.\n\n## Building and installing the library\nFollow these steps from the build directory:\n```bash\ncmake --build . --target install\n```\nThis will build and install the library artifacts to the install path you specified earlier.\n\n## Running tests\nTests can be built using the `BUILD_TESTING=ON` flag. To list the tests use `ctest -N`. To run the tests simply use:\n```bash\nctest\n```\nOptionally you may use the `--output-on-failure` or `-V` flags to see all output from the tests.\n\n## Linking the library through CMake in external projects\n1. After installing the library as shown in the previous steps, you can simply link the library in your external project from the root `CMakeLists.txt` using:\n    ```cmake\n    find_package(DataStructures 0.1.0 CONFIG REQUIRED)\n    ```\n    and\n    ```cmake\n    target_link_libraries(${PROJECT_NAME}\n            PRIVATE\n                    DataStructures::DataStructures\n    )\n    ```\n1. Set the `CMAKE_PREFIX_PATH` - Path to the directory where the library is installed while building your external project.\n\n## Linking the library through CMake in internal projects\n1. Copy the contents of this repository to `lib/data_structures` in the source tree of your internal project. \n    ```bash\n    rsync -av path/to/cloned/data-structures/ lib/data_structures/\n    ```\n1. In the root `CMakeLists.txt`:\n    ```cmake\n    add_subdirectory(lib)\n    ```\n    and\n    ```cmake\n    target_link_libraries(${PROJECT_NAME}\n        PRIVATE\n                DataStructures\n    )\n    ```\n1. In `lib/CMakeLists.txt`:\n    ```cmake\n    add_subdirectory(data_structures)\n    ```\n1. Now you can configure/generate and build the project from the build directory:\n    ```bash\n    mkdir build\n    cd build\n    cmake ..\n    cmake --build .\n    ```\n    This will generate the required target by properly linking the library.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscar027%2Fdata-structures","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscar027%2Fdata-structures","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscar027%2Fdata-structures/lists"}