{"id":18275780,"url":"https://github.com/davideuler/rust-lib-via-cpp","last_synced_at":"2025-04-09T04:13:58.510Z","repository":{"id":138210831,"uuid":"567150917","full_name":"davideuler/rust-lib-via-cpp","owner":"davideuler","description":"Demo to call rust library in cpp project","archived":false,"fork":false,"pushed_at":"2022-11-20T08:55:52.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-14T22:32:34.203Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davideuler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2022-11-17T07:13:26.000Z","updated_at":"2022-11-20T10:45:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"bef2f9fe-a9ca-4ac3-80c8-bb2425ad8249","html_url":"https://github.com/davideuler/rust-lib-via-cpp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davideuler%2Frust-lib-via-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davideuler%2Frust-lib-via-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davideuler%2Frust-lib-via-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davideuler%2Frust-lib-via-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davideuler","download_url":"https://codeload.github.com/davideuler/rust-lib-via-cpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247974731,"owners_count":21026742,"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","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":[],"created_at":"2024-11-05T12:14:04.276Z","updated_at":"2025-04-09T04:13:58.505Z","avatar_url":"https://github.com/davideuler.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rust-lib-via-cpp\n\nThe project is a minimal demo for calling Rust library in C++.\n\n\n## Build rust lib\n```\ncargo build\n```\n\n## Build c++ demo application:\n```\ng++ -std=c++17 -o cpp_program src/main.cpp \\\n      -I .. -I target/cxxbridge \\\n      -L target/debug -l arustlib \\\n      -pthread -l dl\n```\n\n\nReference: \n* https://stackoverflow.com/questions/71097948/failing-to-use-cxx-to-link-rust-written-library-in-c-project\n\n* https://cxx.rs/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavideuler%2Frust-lib-via-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavideuler%2Frust-lib-via-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavideuler%2Frust-lib-via-cpp/lists"}