{"id":13492605,"url":"https://github.com/helje5/wren-swift","last_synced_at":"2025-10-25T04:21:40.154Z","repository":{"id":63911908,"uuid":"330810094","full_name":"helje5/wren-swift","owner":"helje5","description":"The wren scripting language as a Swift package, w/ some Swift API wrappers","archived":false,"fork":false,"pushed_at":"2021-01-19T20:41:40.000Z","size":133,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-03-16T19:18:39.484Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/helje5.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-18T23:20:25.000Z","updated_at":"2023-05-19T04:33:44.000Z","dependencies_parsed_at":"2023-01-14T13:15:52.682Z","dependency_job_id":null,"html_url":"https://github.com/helje5/wren-swift","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/helje5%2Fwren-swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helje5%2Fwren-swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helje5%2Fwren-swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helje5%2Fwren-swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/helje5","download_url":"https://codeload.github.com/helje5/wren-swift/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767259,"owners_count":20992541,"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-07-31T19:01:07.464Z","updated_at":"2025-10-25T04:21:35.136Z","avatar_url":"https://github.com/helje5.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# swift-wren\n\nA Swift package and wrapper for the [wren](https://wren.io) scripting language.\nThere is a good [QA](https://wren.io/qa.html) on wren. It's a very small embeddable\nlanguage similar to Lua, but w/o the weirdness.\n\nA major thing missing in wren is \n[reentrancy](https://github.com/wren-lang/wren/issues/487)\nwith the host environment.\nAnother issue is that host functions do not get any function environment,\ni.e. no function specific userdata pointer, or other means which would allow\na trampoline.\nPRs are still welcome, and we'll see where wren is going in the future.\n\nThis SwiftPM package embeds Wren itself, i.e. it contains the amalgation in a vendored\nbranch.\n\n\n### What does it look like?\n\nThe example from the [QA](https://wren.io/qa.html):\n\n```wren\nclass Account {\n  construct new(balance) { _balance = balance }\n  withdraw(amount) { _balance = _balance - amount }\n}\n\nvar account = Account.new(1000)\naccount.withdraw(100)\n```\n\n### What does the Swift Wrapper look like\n\nHello world:\n\n```swift\nlet vm = WrenVM()\ntry vm.interpret(\n  \"\"\"\n  System.print(\"I'm running in a VM!\")\n  \"\"\"\n)\n```\n\nUsing dynamicCallable:\n```swift\nlet vm = WrenVM()\ntry vm.main.System.print(\"Hello World!\")\n```\n\n\n### Links\n\n- [wren](https://wren.io)\n  - [QA](https://wren.io/qa.html)\n\n### Who\n\n**swift-wren** is brought to you by\nthe\n[Always Right Institute](https://www.alwaysrightinstitute.com)\nand\n[ZeeZide](http://zeezide.de).\nWe like \n[feedback](https://twitter.com/ar_institute), \nGitHub stars, \ncool [contract work](http://zeezide.com/en/services/services.html),\npresumably any form of praise you can think of.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelje5%2Fwren-swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelje5%2Fwren-swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelje5%2Fwren-swift/lists"}