{"id":26356460,"url":"https://github.com/dolanor/sobed","last_synced_at":"2025-03-16T13:30:25.066Z","repository":{"id":57706011,"uuid":"500999894","full_name":"dolanor/sobed","owner":"dolanor","description":"embed .so in your Go binary and dlopen them","archived":false,"fork":false,"pushed_at":"2022-06-09T01:10:06.000Z","size":7,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-14T20:20:49.079Z","etag":null,"topics":["cgo","embed","go","library","shared-object-library"],"latest_commit_sha":null,"homepage":"","language":"Go","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/dolanor.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}},"created_at":"2022-06-07T20:49:53.000Z","updated_at":"2024-01-10T15:16:50.000Z","dependencies_parsed_at":"2022-08-24T12:50:32.403Z","dependency_job_id":null,"html_url":"https://github.com/dolanor/sobed","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dolanor%2Fsobed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dolanor%2Fsobed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dolanor%2Fsobed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dolanor%2Fsobed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dolanor","download_url":"https://codeload.github.com/dolanor/sobed/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243874839,"owners_count":20361901,"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":["cgo","embed","go","library","shared-object-library"],"created_at":"2025-03-16T13:30:24.478Z","updated_at":"2025-03-16T13:30:25.059Z","avatar_url":"https://github.com/dolanor.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SOBED\n\n\u003e I want embed, SOBED  \n\u003e Really, really BED  \n\n![who's bad?](https://i.giphy.com/media/11BbSJZpwZAaXu/200.webp)\n\nSOBED is a proof of concept of embedding a shared object (A.K.A. .so, A.K.A. library) in a Go binary.\n\nFrom there, it loads it via `dlopen()` and get the right symbol via `dlsym`.\nThen, with some extra wrapping, you can call it natively from Go (but it's still disgusting CGo behind the scene).\n\n## Why?\n\nIt could be a way to really distribute your binary completely statically, embedding its external dependencies\nin the right version for the right architecture. Of course, if the library uses functionality absent for the current host\nyou will still face suffering and failure.\n\nFor graphical libraries, there is no way to not pass by CGo, but let's avoid some pain and just `go get` this project and run it,\nwithout previous dependencies install step.\n\n## Security?\n\nNone, many steps in the process can fail, and I didn't find a way to have some standard API or wrapper.\n\nAlso, YOU are now responsible for providing the patched lib version if you don't want some security issues.\n\nI guess, it makes more sense for easy to try lib/app, but then, really use the provided libs from your system and install + update\nthem accordingly.\n\n## Try\n\n```\ngo run github.com/dolanor/sobed@latest\n```\n\nIf you want to play with the libgreet C lib, you can just modify it in a clone and rebuild it with a\n```\ngo generate ./greet\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdolanor%2Fsobed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdolanor%2Fsobed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdolanor%2Fsobed/lists"}