{"id":22822993,"url":"https://github.com/haskell-github-trust/quickjs-hs","last_synced_at":"2025-12-11T23:20:48.009Z","repository":{"id":55152094,"uuid":"289731223","full_name":"haskell-github-trust/quickjs-hs","owner":"haskell-github-trust","description":"Haskell bindings for the QuickJS library","archived":false,"fork":false,"pushed_at":"2024-08-06T14:04:33.000Z","size":990,"stargazers_count":6,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-12T03:31:19.178Z","etag":null,"topics":["haskell","quickjs"],"latest_commit_sha":null,"homepage":"https://hackage.haskell.org/package/quickjs-hs","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haskell-github-trust.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-08-23T17:08:50.000Z","updated_at":"2024-11-24T15:38:52.000Z","dependencies_parsed_at":"2025-04-23T03:45:55.396Z","dependency_job_id":"8db3a5bb-ce5d-42d7-80dd-d99a4cf928d3","html_url":"https://github.com/haskell-github-trust/quickjs-hs","commit_stats":null,"previous_names":["goodlyrottenapple/quickjs-hs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/haskell-github-trust/quickjs-hs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell-github-trust%2Fquickjs-hs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell-github-trust%2Fquickjs-hs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell-github-trust%2Fquickjs-hs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell-github-trust%2Fquickjs-hs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haskell-github-trust","download_url":"https://codeload.github.com/haskell-github-trust/quickjs-hs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell-github-trust%2Fquickjs-hs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266160769,"owners_count":23885884,"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":["haskell","quickjs"],"created_at":"2024-12-12T16:13:55.990Z","updated_at":"2025-12-11T23:20:47.953Z","avatar_url":"https://github.com/haskell-github-trust.png","language":"Haskell","readme":"# quickjs-hs\n\n![Tests Cabal](https://github.com/goodlyrottenapple/quickjs-hs/workflows/Tests%20Cabal/badge.svg)\n\n\nThis package provides a Haskell wrapper for the [QuickJS](https://bellard.org/quickjs/) Javascript Engine. It has been inspired by the [quickjs-rs](https://github.com/theduke/quickjs-rs) and [ocaml-quickjs](https://github.com/dhcmrlchtdj/ocaml-quickjs) libraries.\n## Features\n\nThe functionality is quite basic and is currently limited to:\n- evaluating JS code\n- calling a JS function in the global scope\n- marshalling [Aeson Values](https://hackage.haskell.org/package/aeson-1.5.3.0/docs/Data-Aeson.html#t:Value) to and from JSValues.\n\n\n## Examples\nEvaluate an expression:\n\n```haskell\nimport Quickjs\n\none_plus_two = quickjs $ do\n  res \u003c- eval \"1+2\"\n  liftIO $ print res\n```\n\nDeclare a function and call it on an argument:\n\n```haskell\ncall_f = quickjs $ do\n  _ \u003c- eval_ \"f = (x) =\u003e x+1\"\n  res \u003c- eval \"f(2)\"\n  liftIO $ print res\n```\n\nPass a Haskell value (which has a [ToJSON](https://hackage.haskell.org/package/aeson-1.5.3.0/docs/Data-Aeson.html#t:ToJSON) instance) to the JS runtime:\n\n```haskell\naeson_marshall = quickjs $ do\n  _ \u003c- eval_ \"f = (x) =\u003e x+1\"\n  res \u003c- withJSValue (3::Int) $ \\x -\u003e call \"f\" [x]\n  liftIO $ print res\n```\n\n## Contributing\n\nPlease feel free to report bugs/submit feature requests via the [github issue tracker](https://github.com/goodlyrottenapple/quickjs-hs/issues) and submit any pull requests to the [git repository](https://github.com/goodlyrottenapple/quickjs-hs/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaskell-github-trust%2Fquickjs-hs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaskell-github-trust%2Fquickjs-hs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaskell-github-trust%2Fquickjs-hs/lists"}