{"id":15099800,"url":"https://github.com/daneelsan/wolframlanguageruntimezigdemo","last_synced_at":"2026-03-12T14:39:11.974Z","repository":{"id":254042371,"uuid":"844797002","full_name":"daneelsan/WolframLanguageRuntimeZigDemo","owner":"daneelsan","description":"WolframLanguageRuntime demo in Zig","archived":false,"fork":false,"pushed_at":"2025-03-27T19:30:49.000Z","size":309,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-03T06:06:18.350Z","etag":null,"topics":["wolfram-language","wolfram-mathematica","zig"],"latest_commit_sha":null,"homepage":"","language":"Mathematica","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/daneelsan.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":"2024-08-20T01:44:29.000Z","updated_at":"2025-03-27T19:30:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"c891af92-8113-4d08-89a0-6adf1e97c4e4","html_url":"https://github.com/daneelsan/WolframLanguageRuntimeZigDemo","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"7a761a16006d69ec32a88ad99513f89c16ef8f74"},"previous_names":["daneelsan/wolframlanguageruntimezigdemo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/daneelsan/WolframLanguageRuntimeZigDemo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daneelsan%2FWolframLanguageRuntimeZigDemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daneelsan%2FWolframLanguageRuntimeZigDemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daneelsan%2FWolframLanguageRuntimeZigDemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daneelsan%2FWolframLanguageRuntimeZigDemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daneelsan","download_url":"https://codeload.github.com/daneelsan/WolframLanguageRuntimeZigDemo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daneelsan%2FWolframLanguageRuntimeZigDemo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270065427,"owners_count":24520946,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"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":["wolfram-language","wolfram-mathematica","zig"],"created_at":"2024-09-25T17:27:46.951Z","updated_at":"2026-03-12T14:39:11.942Z","avatar_url":"https://github.com/daneelsan.png","language":"Mathematica","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wolfram Language Runtime (SDK) demo in Zig\n\nA demo of the new [Wolfram Language Runtime](https://writings.stephenwolfram.com/2024/07/yet-more-new-ideas-and-new-functions-launching-version-14-1-of-wolfram-language-mathematica/#standalone-wolfram-language-applications) written in [Zig](https://ziglang.org).\n\nI wrote a Wolfram community post expanding on the details [Wolfram Language Runtime (SDK) demo in Zig](https://community.wolfram.com/groups/-/m/t/3252532).\n\n## Demo\n\nWe will create two standalone executables that run the [Transliterate](https://reference.wolfram.com/language/ref/Transliterate.html) function from Wolfram Language.\nThe executables are written in C and Zig.\n\n### Build\n\nThe `zig build` command will build both the C and the Zig executables:\n```shell\n$ zig build --summary all\nBuild Summary: 5/5 steps succeeded\ninstall success\n├─ install transliterate-zig success\n│  └─ zig build-exe transliterate-zig Debug native cached 45ms MaxRSS:36M\n└─ install transliterate-c success\n   └─ zig build-exe transliterate-c Debug native cached 45ms MaxRSS:36M\n```\n\nBy default, the executables are stored in `zig-out/bin`:\n```shell\n$ ls zig-out/bin                                                                                                                                                   ─╯\ntransliterate-c   transliterate-zig\n```\n\n### C\n\nNow that the executable is compiled, see the usage:\n```shell\n$ ./zig-out/bin/transliterate-c\nUsage: ./transliterate-c \"input\"\n```\n\nUse the executable:\n```shell\n$ ./zig-out/bin/transliterate-c 'しんばし'\nshinbashi\n```\n\n### Zig\n\nInstead of specifying where the C header library is (see [build.zig](./build.zig)), we are using a handwritten Zig package: [WolframLanguageRuntime.zig](./src/WolframLanguageRuntime.zig).\n\nNow that the executable is compiled, see the usage:\n```shell\n$ ./zig-out/bin/transliterate-zig\nUsage: ./transliterate-zig \"input\"\n```\n\nUse the executable:\n```shell\n$ ./zig-out/bin/transliterate-zig 'しんばし'\nshinbashi\n```\n\n## Prerequisites\n\n### Architecture\n\nTested on:\n```shell\n$ uname -a\nDarwin mac.lan 24.2.0 Darwin Kernel Version 24.2.0: Fri Dec  6 19:03:40 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6041 arm64\n```\n\n### Wolfram Language version\n\nTested on:\n```Mathematica\nIn[]:= $Version\nOut[]= \"14.3.0 for Mac OS X ARM (64-bit) (March 26, 2025)\"\n```\n\n### Zig version\n\nTested on:\n```shell\n$ zig version\n0.14.0\n```\n\nZig is not on version [1.0](https://github.com/ziglang/zig/milestone/2).\nThe language is in constant development and some things might break in the future.\n\n## References\n\n- [Yet More New Ideas and New Functions: Launching Version 14.1 of Wolfram Language \u0026 Mathematica - Standalone Wolfram Language Applications!](https://writings.stephenwolfram.com/2024/07/yet-more-new-ideas-and-new-functions-launching-version-14-1-of-wolfram-language-mathematica/#standalone-wolfram-language-applications)\n- [Zig Language Reference](https://ziglang.org/documentation/)\n- [Zig Standard Library](https://ziglang.org/documentation/master/std/)\n- [Expression API rough documentation](http://files.wolfram.com/temp-store/ccooley/june/apidefinition_8h.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaneelsan%2Fwolframlanguageruntimezigdemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaneelsan%2Fwolframlanguageruntimezigdemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaneelsan%2Fwolframlanguageruntimezigdemo/lists"}