{"id":24241739,"url":"https://github.com/jccampagne/gojulia","last_synced_at":"2025-09-23T09:32:01.992Z","repository":{"id":149015833,"uuid":"190090046","full_name":"jccampagne/gojulia","owner":"jccampagne","description":"Julia embedding in Go","archived":false,"fork":false,"pushed_at":"2020-02-02T20:30:20.000Z","size":7,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-03-30T09:19:53.449Z","etag":null,"topics":["cgo","demo","fun","go","golang","goroutines","julia","julia-embedding","learning-by-doing"],"latest_commit_sha":null,"homepage":null,"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/jccampagne.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":"2019-06-03T22:18:32.000Z","updated_at":"2024-06-19T11:08:15.841Z","dependencies_parsed_at":"2023-06-17T11:30:49.483Z","dependency_job_id":null,"html_url":"https://github.com/jccampagne/gojulia","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jccampagne%2Fgojulia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jccampagne%2Fgojulia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jccampagne%2Fgojulia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jccampagne%2Fgojulia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jccampagne","download_url":"https://codeload.github.com/jccampagne/gojulia/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233963741,"owners_count":18758093,"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","demo","fun","go","golang","goroutines","julia","julia-embedding","learning-by-doing"],"created_at":"2025-01-14T21:40:20.895Z","updated_at":"2025-09-23T09:31:56.648Z","avatar_url":"https://github.com/jccampagne.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\nSimple examples showing how to embed Julia in Go.\n\n# Requirements\n\nJulia, Go, Make.\n\n`go`, `julia` and `julia-config.jl`  in your path.\n\n\nYou will probably have to add `julia-config.jl` to your PATH. Julia config tool on macOS, using Julia installed with [brew](https://brew.sh) is located here:\n\n```\n/Applications/Julia-1.2.app/Contents/Resources/julia/share/julia/julia-config.jl\n```\n\n\n# Run the examples\n\nThis was tested on macOS, but should also work on Linux.\n\nA makefile is provide for convenience, just type:\n\n```\nmake\n```\n\nThis will compile the examples and run them (note: one of the example will fail on purpose).\n\n\n# Description\n\nThere are 3 examples:\n\n1. `gjl.go`: very simple example\n1. `gjl_goroutines.go`: executing julia code from 2 different goroutines with synchronisation.\n1. `gjl_goroutines_fail.go`: same as above example, but demonstrate failure when accessing julia from multiple goroutine without synchronization.\n\n\n# C binding\n\nJulia is embedding in Go using cgo and a couple of C binding files: `gjl.h` and `gjl.c`.\nThese files provide function wrappers around [Julia C API](https://docs.julialang.org/en/v1/manual/embedding/index.html) that are defined C macros in Julia. Cgo cannot use C macros directly. For example [jl_typeof(v)](https://github.com/JuliaLang/julia/blob/d249e71ef2fd59acd557f2f6c9688253f4b5a47d/src/julia.h#L107) is a macro.\n\n# References\n\n\n* [cgo](https://golang.org/cmd/cgo/)\n* [Embedding Julia](https://docs.julialang.org/en/v1/manual/embedding/index.html)\n* [julia.h](https://github.com/JuliaLang/julia/blob/master/src/julia.h)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjccampagne%2Fgojulia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjccampagne%2Fgojulia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjccampagne%2Fgojulia/lists"}