{"id":23461108,"url":"https://github.com/byteally/wasmedge","last_synced_at":"2025-10-30T22:31:33.555Z","repository":{"id":201192007,"uuid":"647332771","full_name":"byteally/wasmedge","owner":"byteally","description":"Haskell binding to WasmEdge Runtime for hosting","archived":false,"fork":false,"pushed_at":"2023-10-28T18:31:52.000Z","size":730,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-12-24T07:32:12.079Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/byteally.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-05-30T14:51:07.000Z","updated_at":"2024-12-04T19:15:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"98feda1d-83be-43ba-b701-65897ab9f2db","html_url":"https://github.com/byteally/wasmedge","commit_stats":null,"previous_names":["byteally/wasmedge"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byteally%2Fwasmedge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byteally%2Fwasmedge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byteally%2Fwasmedge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byteally%2Fwasmedge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/byteally","download_url":"https://codeload.github.com/byteally/wasmedge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239073969,"owners_count":19577124,"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-12-24T07:29:05.564Z","updated_at":"2025-10-30T22:31:26.809Z","avatar_url":"https://github.com/byteally.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch3 align=\"center\"\u003eWasmEdge-Haskell\u003c/h3\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n## Haskell binding to [WasmEdge](https://wasmedge.org/) Runtime for hosting\n\n\n  [![Status](https://img.shields.io/badge/status-active-success.svg)]() \n  [![GitHub Issues](https://img.shields.io/github/issues/kylelobo/The-Documentation-Compendium.svg)](https://github.com/byteally/wasmedge/issues)\n  [![GitHub Pull Requests](https://img.shields.io/github/issues-pr/kylelobo/The-Documentation-Compendium.svg)](https://github.com/byteally/wasmedge/pulls)\n  [![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n\n\u003c/div\u003e\n\n## Introduction\nWasmEdge-Haskell is a library that allows you to use WebAssembly code (.wasm) in your Haskell projects at near-native speed. It's a Haskell binding for the WasmEdge [C-SDK](https://wasmedge.org/docs/embed/c/intro), allowing you to use Haskell as a host application and embed WebAssembly functions written in other languages.\n\n## Getting Started\n\n### Prerequisites\n1. Install WasmEdge\n\n        $ curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash\n\n2. Clone this repository into your Haskell project.\n\n        with-compiler: ghc-9.2.8\n\n        source-repository-package\n        type: git\n        location: git@github.com:byteally/wasmedge.git\n        tag: 80f3635a2b3f5346c85ef55bd599b081ebc995d8 -- use latest commit tag here\n\n        packages:\n            \u003cproject-name\u003e.cabal\n\n3. Specify the package in your project's `.cabal` file as a dependency.\n\n        build-depends:    base ^\u003e= 4.11.1.0\n                          ,wasmedge\n\n## 🎈 Usage \u003ca name=\"usage\"\u003e\u003c/a\u003e\nBelow is an example of using the `vmRunWasmFromFile` function, assuming you have a `addTwo.wasm` file which contains a function named `addTwo`.\n\n```Haskell\n{-# LANGUAGE OverloadedStrings #-} -- for conversion of String and WasmString\nmodule Main where\n\nimport WasmEdge.Configure\nimport WasmEdge.Internal.FFI.Bindings (HostRegistration(HostRegistration_Wasi),WasmVal(WasmInt32))\nimport WasmEdge.VM\nimport qualified Data.Vector as V\n\naddTwoNumbers :: Int -\u003e Int -\u003e IO ()\naddTwoNumbers x y = do\n    Just cfg \u003c- configureCreate\n    configureAddHostRegistration cfg HostRegistration_Wasi  --optional\n    Just vm \u003c- vmCreate (Just cfg) Nothing\n    addTwoRes \u003c- vmRunWasmFromFile vm \"./wasm/addTwo.wasm\" \"addTwo\" (V.fromList [WasmInt32 (fromIntegral x),WasmInt32 (fromIntegral y)]) 1\n    print (snd addTwoRes)\n\nmain :: IO ()\nmain = addTwoNumbers 2 3\n```\n\n### Output\n```bash\n[5]\n```\n\n## API Reference\nThe API Documentation would be available on Hackage soon.\n\n## Reference\nFor more information, please refer to the WasmEdge's [Embed](https://wasmedge.org/docs/embed/overview) Documentation.\n\n## ✍️ Authors \u003ca name = \"authors\"\u003e\u003c/a\u003e\n- [@mageshb](https://github.com/mageshb) - Idea \u0026 Initial work\n- [@tusharad](https://github.com/tusharad) - Contributed\n\n## Contribution\n\nContributions are welcome! Feel free to fork the repository or submit a pull request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyteally%2Fwasmedge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbyteally%2Fwasmedge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyteally%2Fwasmedge/lists"}