{"id":46470670,"url":"https://github.com/open-simulation-platform/libcosim","last_synced_at":"2026-05-18T12:08:15.821Z","repository":{"id":38322871,"uuid":"138032511","full_name":"open-simulation-platform/libcosim","owner":"open-simulation-platform","description":"OSP C++ co-simulation library","archived":false,"fork":false,"pushed_at":"2026-05-15T17:36:41.000Z","size":9957,"stargazers_count":72,"open_issues_count":57,"forks_count":13,"subscribers_count":8,"default_branch":"master","last_synced_at":"2026-05-15T17:39:06.834Z","etag":null,"topics":["co-simulation","fmi"],"latest_commit_sha":null,"homepage":"https://open-simulation-platform.github.io/libcosim","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/open-simulation-platform.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-06-20T12:52:29.000Z","updated_at":"2026-03-22T08:46:30.000Z","dependencies_parsed_at":"2026-03-06T07:03:48.250Z","dependency_job_id":null,"html_url":"https://github.com/open-simulation-platform/libcosim","commit_stats":{"total_commits":429,"total_committers":22,"mean_commits":19.5,"dds":0.710955710955711,"last_synced_commit":"9dff0ad0f87f8612d4e42660c1e9f320a9288d87"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/open-simulation-platform/libcosim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-simulation-platform%2Flibcosim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-simulation-platform%2Flibcosim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-simulation-platform%2Flibcosim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-simulation-platform%2Flibcosim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/open-simulation-platform","download_url":"https://codeload.github.com/open-simulation-platform/libcosim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-simulation-platform%2Flibcosim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33177355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["co-simulation","fmi"],"created_at":"2026-03-06T06:16:54.477Z","updated_at":"2026-05-18T12:08:15.816Z","avatar_url":"https://github.com/open-simulation-platform.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libcosim - An open-source co-simulation library for C++\n\n[![libcosim CI Conan](https://github.com/open-simulation-platform/libcosim/actions/workflows/ci-conan.yml/badge.svg)](https://github.com/open-simulation-platform/libcosim/actions/workflows/ci-conan.yml)\n[![libcosim CI CMake](https://github.com/open-simulation-platform/libcosim/actions/workflows/ci-cmake.yml/badge.svg)](https://github.com/open-simulation-platform/libcosim/actions/workflows/ci-cmake.yml)\n\nLibcosim was developed as part of the [Open Simulation Platform][OSP] (OSP).\nSee [`CONTRIBUTING.md`] for contributor guidelines and [`LICENSE`] for terms\nof use.\n\n\n## How to use\n\nThe recommended way to include libcosim in your own projects is via the\n[Conan] C/C++ package manager. First, you need to add the OSP package\nrepository to your remotes, like this:\n\n    conan remote add osp https://osp.jfrog.io/artifactory/api/conan/conan-local\n\nThen, you can simply list `libcosim/\u003cversion\u003e` as a requirement in your\nconanfile. Note that libcosim requires Conan 2.x.\n\nEven if your project cannot use Conan for some reason, it is still possible to\nuse libcosim. In that case, you have to build it from source and manage the\ndependency yourself. Instructions for building are in the next section.\n\nFor demonstrations of libcosim use, check out the OSP [Cosim] command-line\ninterface and [Cosim Demo Application].\n\n### Other programming languages\n\nWrappers exist for other programming languages too:\n\n* C++: [libcosimc]\n* Python: [libcosimpy]\n* Java/JVM: [cosim4j]\n\nNote that none of them have complete support for all libcosim features.\n\n\n## How to build\n\n### Step 0: Get your tools in order\n\nThe tools needed to build libcosim are:\n\n  * Compilers: [Visual Studio] \u003e= 16.0/2019 (Windows), GCC \u003e= 9 (Linux)\n  * Build tool: [CMake] \u003e= 3.19\n  * Package manager (optional): [Conan] 2.x\n  * API documentation generator (optional): [Doxygen]\n\nIn this guide, we will use Conan to download and configure libcosim's\ndependencies. We strongly recommend that you do too, even when you're unable\nto use it to incorporate libcosim in your own project afterwards. It *is*\npossible to use other package managers or manage the dependencies yourself,\nbut then you're mostly on your own. (See the [CI without Conan] GitHub\nactions workflow we've set up for an example of how to do it via the Debian\npackage manager.)\n\nWe will also assume that your CMake is version 3.23 or newer, even if\nlibcosim's minimum requirement is CMake 3.19. The reason is that this lets us\nuse the convenient `--preset` switch. If you need to use a slightly older\nversion, the [Conan CMakeToolchain documentation] has a simple workaround.\n\n### Step 1: Install dependencies\n\nFirst, make sure that you've added the OSP package repository to your Conan\nremotes as shown in the previous section. Then, go to the root directory of\nthe libcosim source tree (i.e., the directory that contains this README\nfile) and run the following command:\n\n    conan install --build=missing .\n\nThis will install all dependencies, building the ones for which binary\npackages weren't available online, and set up some configuration files for the\nnext steps. Add `--options=\"proxyfmu=True\"` to the above command to enable\nsupport for [proxy-fmu].\n\n### Step 2: Generate build system\n\nNext, to generate the libcosim build system, run:\n\n    cmake --preset=\u003cconfig-preset-name\u003e\n\nwhere `\u003cconfig-preset-name\u003e` depends on the underlying toolchain. For Visual\nStudio on Windows it will usually be `conan-default`, while for GCC/Make on\nLinux it should be `conan-release` or `conan-debug`, depending on which build\ntype you want. (More precisely, it depends on whether a multi- or\nsingle-configuration CMake generator is used. Consult the\n[Conan CMakeToolchain documentation] for details on presets and their names.)\n\nNote that the build type you choose must match one set up by `conan install`.\nIf you only ran `conan install` once and didn't specify a build type in the\nfirst step, it will pick the default one from your Conan profile (usually\n\"release\"). You can re-run `conan install` with different `build_type` settings\nif you want to be able to easily switch between different build types.\n\nThere are a few options you may want to add to this command to enable or\ndisable various features for which we do not have corresponding Conan options.\nThe only one we'll mention here is `-DLIBCOSIM_BUILD_TESTS=ON`, which will\nenable running the test suite in step 4. For other options, see the `option()`\ndeclarations near the top of [CMakeLists.txt], or use the CMake GUI.\n\n### Step 3: Build libcosim\n\nTo build libcosim, now run\n\n    cmake --build --preset=\u003cbuild-preset-name\u003e\n\nwhere `\u003cbuild-preset-name\u003e` will usually be `conan-release` or `conan-debug`,\ndepending again on which build type you want. (Note that on Windows/VS this is\n*different* from the previous step, while on Linux/GCC/Make it must be the\nexact *same*.)\n\n### Step 4 (optional): Run tests\n\nIf you did not enable unittests in step 2, go back and do so now, and rebuild\nlibcosim. Then, run\n\n    ctest --preset=\u003cbuild-preset-name\u003e\n\nwhere `\u003cbuild-preset-name\u003e` is the same as in the previous step.\n\n### Step 5 (optional): Install libcosim\n\nBefore you do this, you probably want to set the [`CMAKE_INSTALL_PREFIX`]\nvariable to the desired install location first. Then, simply run:\n\n    cmake --build --preset=\u003cbuild-preset-name\u003e --target=install\n\n\n[CI without Conan]: ./.github/workflows/ci-cmake.yml\n[CMake]: https://cmake.org\n[`CMAKE_INSTALL_PREFIX`]: https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html\n[CMakeLists.txt]: ./CMakeLists.txt\n[Conan]: https://conan.io\n[Conan CMakeToolchain documentation]: https://docs.conan.io/2/examples/tools/cmake/cmake_toolchain/build_project_cmake_presets.html\n[`CONTRIBUTING.md`]: ./CONTRIBUTING.md\n[Cosim]: https://github.com/open-simulation-platform/cosim-cli\n[Cosim Demo Application]: https://github.com/open-simulation-platform/cosim-demo-app\n[cosim4j]: https://github.com/open-simulation-platform/cosim4j\n[Doxygen]: http://www.doxygen.org\n[libcosimc]: https://github.com/open-simulation-platform/libcosimc\n[libcosimpy]: https://github.com/open-simulation-platform/libcosimpy\n[`LICENSE`]: ./LICENSE\n[OSP]: https://opensimulationplatform.com/\n[proxy-fmu]: https://github.com/open-simulation-platform/proxy-fmu/\n[Visual Studio]: https://visualstudio.microsoft.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-simulation-platform%2Flibcosim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopen-simulation-platform%2Flibcosim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-simulation-platform%2Flibcosim/lists"}