{"id":13498016,"url":"https://github.com/swiftwasm/wamr-swift","last_synced_at":"2025-03-28T22:32:04.268Z","repository":{"id":53331150,"uuid":"323205286","full_name":"swiftwasm/wamr-swift","owner":"swiftwasm","description":"Swift WebAssembly runtime powered by WAMR","archived":false,"fork":false,"pushed_at":"2021-03-31T11:36:23.000Z","size":45,"stargazers_count":31,"open_issues_count":1,"forks_count":1,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-04-13T21:55:32.448Z","etag":null,"topics":["swift","swiftwasm","wasi","wasm","webassembly","webassembly-runtime"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/swiftwasm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["swiftwasm"],"patreon":null,"open_collective":"swiftwasm","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-12-21T01:55:52.000Z","updated_at":"2024-02-26T17:04:46.000Z","dependencies_parsed_at":"2022-09-11T04:31:30.827Z","dependency_job_id":null,"html_url":"https://github.com/swiftwasm/wamr-swift","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftwasm%2Fwamr-swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftwasm%2Fwamr-swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftwasm%2Fwamr-swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftwasm%2Fwamr-swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swiftwasm","download_url":"https://codeload.github.com/swiftwasm/wamr-swift/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245526460,"owners_count":20629835,"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":["swift","swiftwasm","wasi","wasm","webassembly","webassembly-runtime"],"created_at":"2024-07-31T20:00:48.395Z","updated_at":"2025-03-28T22:32:03.966Z","avatar_url":"https://github.com/swiftwasm.png","language":"Swift","funding_links":["https://github.com/sponsors/swiftwasm","https://opencollective.com/swiftwasm"],"categories":["Developer tools","Swift"],"sub_categories":[],"readme":"# wamr-swift\n\nSwift WebAssembly runtime powered by [WAMR](https://github.com/bytecodealliance/wasm-micro-runtime).\n\n## Adding wamr-swift as a Dependency\n\nTo use the wamr-swift library in a SwiftPM project, add the following line to the dependencies in your Package.swift file:\n\n```swift\nlet package = Package(\n    name: \"Example\",\n    dependencies: [\n        .package(name: \"WAMR\", url: \"https://github.com/swiftwasm/wamr-swift\", from: \"0.1.1\"),\n    ],\n    targets: [\n        .target(name: \"Example\", dependencies: [\"WAMR\"]),\n    ]\n)\n\n```\n\n\n## Example\n\n```swift\nimport WAMR\nimport Foundation\n\nlet inputFile = CommandLine.arguments[1]\nlet binary = try Array(Data(contentsOf: URL(fileURLWithPath: inputFile)))\n\nWasmRuntime.initialize()\nlet module = try WasmModule(binary: binary)\nmodule.setWasiOptions(dirs: [], mapDirs: [], envs: [], args: [])\nlet instance = try module.instantiate(stackSize: 64 * 1024)\ntry instance.executeMain(args: [])\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftwasm%2Fwamr-swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswiftwasm%2Fwamr-swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftwasm%2Fwamr-swift/lists"}