{"id":48792680,"url":"https://github.com/erlang-mozjs/erlang-mozjs","last_synced_at":"2026-04-13T21:05:47.759Z","repository":{"id":56393825,"uuid":"146898308","full_name":"erlang-mozjs/erlang-mozjs","owner":"erlang-mozjs","description":" A NIF module for Erlang to Mozilla's Spidermonkey Javascript runtime. ","archived":false,"fork":false,"pushed_at":"2026-02-24T23:38:47.000Z","size":3816,"stargazers_count":13,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-02-25T04:47:46.731Z","etag":null,"topics":["erlang","javascript","js","nif","spidermonkey"],"latest_commit_sha":null,"homepage":null,"language":"Erlang","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/erlang-mozjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-08-31T13:51:45.000Z","updated_at":"2026-02-24T23:38:52.000Z","dependencies_parsed_at":"2023-01-21T06:45:24.878Z","dependency_job_id":null,"html_url":"https://github.com/erlang-mozjs/erlang-mozjs","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/erlang-mozjs/erlang-mozjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erlang-mozjs%2Ferlang-mozjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erlang-mozjs%2Ferlang-mozjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erlang-mozjs%2Ferlang-mozjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erlang-mozjs%2Ferlang-mozjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erlang-mozjs","download_url":"https://codeload.github.com/erlang-mozjs/erlang-mozjs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erlang-mozjs%2Ferlang-mozjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31770784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["erlang","javascript","js","nif","spidermonkey"],"created_at":"2026-04-13T21:05:47.101Z","updated_at":"2026-04-13T21:05:47.751Z","avatar_url":"https://github.com/erlang-mozjs.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nSPDX-FileCopyrightText: 2009-2010 Basho Technologies\nSPDX-FileCopyrightText: 2020-2026 Peter Lemenkov \u003clemenkov@gmail.com\u003e\nSPDX-License-Identifier: Apache-2.0\n--\u003e\n\n# erlang-mozjs\n\n[![CI](https://github.com/erlang-mozjs/erlang-mozjs/actions/workflows/ci.yml/badge.svg)](https://github.com/erlang-mozjs/erlang-mozjs/actions/workflows/ci.yml)\n[![REUSE status](https://api.reuse.software/badge/github.com/erlang-mozjs/erlang-mozjs)](https://api.reuse.software/info/github.com/erlang-mozjs/erlang-mozjs)\n\n`erlang-mozjs` is a NIF library that embeds Mozilla's SpiderMonkey JavaScript\nengine in Erlang. Originally created to facilitate usage of Riak's MapReduce\nby non-Erlang programmers, it supports multiple concurrent JavaScript VMs,\nruntime evaluation of JavaScript code, and invocation of JavaScript functions.\n\n`erlang-mozjs` builds and executes on Unix-based platforms including Linux,\nmacOS, and the BSDs.\n\n## Supported SpiderMonkey versions\n\nThe library is tested against the following mozjs versions:\n\n| mozjs version | Fedora version |\n|---------------|----------------|\n| mozjs115      | Fedora 41–42   |\n| mozjs128      | Fedora 43–44   |\n| mozjs140      | Fedora rawhide |\n\nThe build system auto-detects the installed version via `pkg-config`.\n\n## Requirements\n\n- Erlang/OTP 25 or later\n- rebar3\n- SpiderMonkey (mozjs) development headers\n- A C++17 compiler\n- pkg-config\n\n### Fedora\n\n```sh\nsudo dnf install erlang-rebar3 gcc-c++ mozjs128-devel pkg-config make\n```\n\n### Debian/Ubuntu\n\nSpiderMonkey dev packages are available as `libmozjs-*-dev`:\n\n```sh\nsudo apt install erlang-dev g++ libmozjs-128-dev pkg-config make\n```\n\n## Quick Start\n\n```sh\ngit clone https://github.com/erlang-mozjs/erlang-mozjs.git\ncd erlang-mozjs\nmake all test\n```\n\nStart an Erlang shell:\n\n```sh\nrebar3 shell\n```\n\nCreate a JavaScript VM and run some code:\n\n```erlang\n1\u003e {ok, JS} = js_driver:new().\n{ok,#Ref\u003c0.557298074.1409679362.105432\u003e}\n2\u003e js:define(JS, \u003c\u003c\"var addOne = function(a){ return a + 1; }\"\u003e\u003e).\nok\n3\u003e js:call(JS, \u003c\u003c\"addOne\"\u003e\u003e, [3]).\n{ok,4}\n4\u003e js_driver:destroy(JS).\nok\n```\n\n## Building\n\n```sh\nmake compile       # Compile only\nmake test          # Run EUnit tests\nmake dialyzer      # Run Dialyzer\nmake xref          # Run Xref\nmake fmt           # Format Erlang code (erlfmt)\nmake check-fmt     # Check formatting\nmake check         # All checks (test + dialyzer + xref + check-fmt)\n```\n\n## Documentation\n\nAPI documentation can be generated with:\n\n```sh\nmake docs\n```\n\n## License\n\nApache-2.0. See [LICENSE](LICENSE) for details.\n\n## Contributing\n\n1. Fork the repository on [GitHub](https://github.com/erlang-mozjs/erlang-mozjs).\n2. Create a topic branch: `git checkout -b my-feature`\n3. Make your changes and commit.\n4. Push to your fork and open a pull request.\n\nPlease ensure `make check` passes before submitting.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferlang-mozjs%2Ferlang-mozjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferlang-mozjs%2Ferlang-mozjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferlang-mozjs%2Ferlang-mozjs/lists"}