{"id":16603351,"url":"https://github.com/dbrgn/rust-cdylibtest","last_synced_at":"2026-04-22T06:07:04.928Z","repository":{"id":66130151,"uuid":"119847098","full_name":"dbrgn/rust-cdylibtest","owner":"dbrgn","description":null,"archived":false,"fork":false,"pushed_at":"2018-02-01T15:06:28.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-11T12:59:50.038Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dbrgn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-02-01T14:32:06.000Z","updated_at":"2019-10-12T05:53:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"5be0ba6f-6da2-4257-a3f0-c6920f0abc1f","html_url":"https://github.com/dbrgn/rust-cdylibtest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dbrgn/rust-cdylibtest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbrgn%2Frust-cdylibtest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbrgn%2Frust-cdylibtest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbrgn%2Frust-cdylibtest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbrgn%2Frust-cdylibtest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbrgn","download_url":"https://codeload.github.com/dbrgn/rust-cdylibtest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbrgn%2Frust-cdylibtest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32123605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T00:31:26.853Z","status":"online","status_checked_at":"2026-04-22T02:00:05.693Z","response_time":58,"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":[],"created_at":"2024-10-12T00:49:37.337Z","updated_at":"2026-04-22T06:07:04.912Z","avatar_url":"https://github.com/dbrgn.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"crate a contains two `no_mangle` functions (`make_world` and `print_world`)\n\ncrate b depends on a and re-exports those functions, and adds an additional function (`goodbye_world`)\n\nwhen checking with `objdump`:\n\n    $ objdump -T a/target/debug/liba.so  | grep world\n    00000000000030c0 g    DF .text  0000000000000303  Base        print_world\n    0000000000002f20 g    DF .text  000000000000019a  Base        make_world\n    $ objdump -T b/target/debug/libb.so  | grep world\n    00000000000034a0 g    DF .text  0000000000000086  Base        goodbye_world\n\nthe `libb.so` file does not expose those symbols.\n\ncreating wrapper functions works kind-of (see crate `b2`), but it's quite ugly.\nalso, for some reason, `test.c` in `b2` segfaults while `test.c` in `a` works fine.\n\n    $ cd b2\n    $ cc test.c -L target/debug -l b2 -o test\n    $ LD_LIBRARY_PATH=target/debug ./test\n    Test start\n\n    From b2 crate:\n    Output: Goodbye, world!\n\n    From a crate:\n    Segmentation fault (core dumped)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbrgn%2Frust-cdylibtest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbrgn%2Frust-cdylibtest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbrgn%2Frust-cdylibtest/lists"}