{"id":19935152,"url":"https://github.com/optimizely/go-sdk-c-wrapper-hack-week","last_synced_at":"2025-05-03T12:31:06.666Z","repository":{"id":71780309,"uuid":"239583134","full_name":"optimizely/go-sdk-c-wrapper-hack-week","owner":"optimizely","description":"A GO SDK wrapper for C/C++ (any native code) - Winter Hack Week 2020","archived":true,"fork":false,"pushed_at":"2020-02-10T18:39:52.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-01T12:17:18.685Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/optimizely.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":"2020-02-10T18:29:43.000Z","updated_at":"2023-09-25T18:15:45.000Z","dependencies_parsed_at":"2023-06-10T10:45:13.384Z","dependency_job_id":null,"html_url":"https://github.com/optimizely/go-sdk-c-wrapper-hack-week","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/optimizely%2Fgo-sdk-c-wrapper-hack-week","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optimizely%2Fgo-sdk-c-wrapper-hack-week/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optimizely%2Fgo-sdk-c-wrapper-hack-week/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optimizely%2Fgo-sdk-c-wrapper-hack-week/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/optimizely","download_url":"https://codeload.github.com/optimizely/go-sdk-c-wrapper-hack-week/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252190737,"owners_count":21708941,"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-12T23:18:56.440Z","updated_at":"2025-05-03T12:31:06.657Z","avatar_url":"https://github.com/optimizely.png","language":"C","readme":"# README\n\nThis repository gives an example of how the Optimizely GO SDK can be compiled and used in native C/C++ code.\n\nIn this example an Nginx module is built that dynamically loads the Optimizely SDKs and changes it's behavior depending\non some feature flags.\n\nThe nginx module is based on \u003chttps://github.com/perusio/nginx-hello-world-module\u003e\n\nThis was done as part of Winter Hackweek 2020.\n\n## Build\n\nFirst compile nginx on a Linux VM.\n\n```\nssh LINUX_HOST\ncd \u003cpathtodir with nginx\u003e\n./configure --with-debug --add-dynamic-module=/home/ec2-user/go-sdk-c-wrapper/nginx-hello-world-module\nmake\n```\n\nCopy this directory over to the linux box and `make` to build the shared library. Golang cross compiling still can't\ncompile native code. See `Makefile` for `cp` target that does this.\n\nThe following didn't work. Only dynamically loading the module seems to work.\n\n```\n./configure --with-debug --add-module=/home/ec2-user/go-sdk-c-wrapper/nginx-hello-world-module --with-ld-opt=/home/ec2-user/go-sdk-c-wrapper/go-sdk-c-wrapper.so\n./configure --add-module=/home/ec2-user/nginx-hello-world-module\n./configure --add-dynamic-module=/home/ec2-user/nginx-hello-world-module\n```\n\n## Local builds\n\nFor a local test, that will build an run on any architecture try the following.\n\n```\nmake localtest\n./test\n```\n\nKey and feature names may need to be adjusted.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foptimizely%2Fgo-sdk-c-wrapper-hack-week","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foptimizely%2Fgo-sdk-c-wrapper-hack-week","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foptimizely%2Fgo-sdk-c-wrapper-hack-week/lists"}