{"id":21895883,"url":"https://github.com/mengmo/quickjs-windows-build","last_synced_at":"2026-02-26T02:43:32.999Z","repository":{"id":38984631,"uuid":"222113322","full_name":"mengmo/QuickJS-Windows-Build","owner":"mengmo","description":"Build QuickJS on Windows","archived":false,"fork":false,"pushed_at":"2022-02-01T16:01:59.000Z","size":5183,"stargazers_count":143,"open_issues_count":5,"forks_count":25,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-15T16:52:50.786Z","etag":null,"topics":["quickjs"],"latest_commit_sha":null,"homepage":"https://github.com/mengmo/QuickJS-Windows-Build","language":"C","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/mengmo.png","metadata":{"files":{"readme":"readme.md","changelog":"Changelog","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-16T14:45:23.000Z","updated_at":"2025-03-21T11:19:10.000Z","dependencies_parsed_at":"2022-09-19T15:51:18.213Z","dependency_job_id":null,"html_url":"https://github.com/mengmo/QuickJS-Windows-Build","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/mengmo/QuickJS-Windows-Build","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mengmo%2FQuickJS-Windows-Build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mengmo%2FQuickJS-Windows-Build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mengmo%2FQuickJS-Windows-Build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mengmo%2FQuickJS-Windows-Build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mengmo","download_url":"https://codeload.github.com/mengmo/QuickJS-Windows-Build/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mengmo%2FQuickJS-Windows-Build/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29848634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T22:37:40.667Z","status":"online","status_checked_at":"2026-02-26T02:00:06.774Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["quickjs"],"created_at":"2024-11-28T13:41:04.465Z","updated_at":"2026-02-26T02:43:32.969Z","avatar_url":"https://github.com/mengmo.png","language":"C","readme":"# QuickJS Windows Build\r\n\r\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/mengmo/QuickJS-Windows-Build?logo=github)](https://github.com/mengmo/QuickJS-Windows-Build/releases)\r\n\r\n[![GitHub issues](https://img.shields.io/github/issues/mengmo/QuickJS-Windows-Build?logo=github)](https://github.com/mengmo/QuickJS-Windows-Build/issues)\r\n[![GitHub stars](https://img.shields.io/github/stars/mengmo/QuickJS-Windows-Build?logo=github)](https://github.com/mengmo/QuickJS-Windows-Build/stargazers)\r\n[![GitHub All Releases](https://img.shields.io/github/downloads/mengmo/QuickJS-Windows-Build/total?logo=github)](https://github.com/mengmo/QuickJS-Windows-Build/releases)\r\n[![GitHub license](https://img.shields.io/github/license/mengmo/QuickJS-Windows-Build?logo=open-source-initiative)](https://github.com/mengmo/QuickJS-Windows-Build/blob/master/LICENSE)\r\n\r\nBuild [QuickJS](https://bellard.org/quickjs/) on Windows, and [prebuilt binary releases](https://github.com/mengmo/QuickJS-Windows-Build/releases).\r\n\r\n*Since all the modifications only affect build behaviors on Windows, you can also use this repository on Linux.*\r\n\r\n## Build Prerequisites\r\nInstall [MSYS2](http://www.msys2.org/)\r\n\r\nIf build 64-bit QuickJS with `MINGW64`, install `x86_64-toolchain`\r\n```\r\npacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-dlfcn\r\necho \"#! /bin/sh\" \u003e /mingw64/bin/make\r\necho \"\\\"mingw32-make\\\" \\\"\\$@\\\"\" \u003e\u003e /mingw64/bin/make\r\n```\r\n\r\nIf build 32-bit QuickJS with `MINGW32`, install `i686-toolchain`\r\n```\r\npacman -S mingw-w64-i686-gcc mingw-w64-i686-make mingw-w64-i686-dlfcn\r\necho \"#! /bin/sh\" \u003e /mingw32/bin/make\r\necho \"\\\"mingw32-make\\\" \\\"\\$@\\\"\" \u003e\u003e /mingw32/bin/make\r\n```\r\n\r\n## Obtain source code\r\n```\r\ngit clone https://github.com/mengmo/QuickJS-Windows-Build.git\r\n```\r\n\r\n## Compilation\r\n```\r\ncd QuickJS-Windows-Build\r\nmake LDEXPORT=\"-static -s\"\r\n```\r\nworkaroud for **qjsc**\r\n```\r\n./qjsc -e -o hello.c examples/hello.js\r\ngcc -D_GNU_SOURCE -I./ -o hello hello.c -static -s -L./ -lquickjs -lm -ldl -lpthread\r\n./hello\r\n```\r\n\r\n## Packaging\r\n```\r\nzip -9 -r quickjs-$(cat version)-win$(echo ${MSYSTEM:0-2}).zip qjs.exe run-test262.exe\r\nmkdir ./bin\r\nmv qjs.exe qjsc.exe run-test262.exe ./bin\r\nmkdir -p ./lib/quickjs\r\nstrip -g libquickjs.a\r\nmv libquickjs.a libquickjs.lto.a ./lib/quickjs\r\nmkdir -p ./include/quickjs\r\ncp -p quickjs.h quickjs-libc.h ./include/quickjs\r\nzip -9 -r quickjs-$(cat version)-win$(echo ${MSYSTEM:0-2})-all.zip ./bin ./doc ./examples ./include ./lib Changelog readme.txt TODO VERSION\r\n```\r\n\r\n## Related Projects\r\n**[quickjs](https://github.com/PetterS/quickjs):** Thin Python wrapper of https://bellard.org/quickjs/\r\n\r\n**[QuickJSPP](https://github.com/ftk/quickjspp):** QuickJS wrapper for C++.\r\n\r\n**[QuickJS-Pascal](https://github.com/Coldzer0/QuickJS-Pascal):** Quickjs FreePascal / Delphi Bindings\r\n\r\n**[quickjs](https://github.com/lithdew/quickjs):** Go bindings to QuickJS: a fast, small, and embeddable ES2020 JavaScript interpreter.\r\n\r\n**[quickjs-rs](https://github.com/theduke/quickjs-rs):** A Rust wrapper for QuickJS.\r\n\r\n**[QuickJS.NET](https://github.com/vmas/QuickJS.NET):** C# bindings for QuickJS\r\n\r\n**[jsvu](https://github.com/GoogleChromeLabs/jsvu):** install recent versions of various JavaScript engines without having to compile them from source.\r\n\r\n**[esvu](https://github.com/devsnek/esvu):** your one-stop shop for all implementations of ECMAScript.\r\n\r\n#### Some efforts to make QuickJS compatible with MSVC\r\n\r\n**[QuickJS Javascript Engine](https://github.com/c-smile/quickjspp):** QuickJS Javascript engine, MS Visual Studio port.\r\n\r\n**[AcidJS](https://github.com/LemonHX/AcidJS):** a fork of QuickJS that compatible with MSVC and using CMAKE to compile.\r\n* * *\r\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;**A method to generate `libquickjs.dll`, use at your own risk.**\r\n\r\n* Generating `libquickjs.dll` with `libquickjs.a`\r\n```\r\n  gcc -shared -o libquickjs.dll -static -s -Wl,--whole-archive libquickjs.a -lm -Wl,--no-whole-archive\r\n```\r\n\r\n* Generating `libquickjs.dll` with `libquickjs.lto.a`\r\n```\r\n  gcc -shared -o libquickjs.dll -static -s -Wl,--whole-archive libquickjs.lto.a -lm -Wl,--no-whole-archive\r\n```\r\n\r\n* Loading `libquickjs.dll` with [`ctypes`](https://docs.python.org/3/library/ctypes.html) from Python\r\n```\r\n  python\r\n  from ctypes import *\r\n  print(windll.libquickjs)\r\n  exit()\r\n```\r\n\r\n* A method to get a list of QuickJS Javascript Engine API\r\n```\r\n  objdump -p libquickjs.dll \u003e libquickjs_api_list.txt\r\n```\r\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;`QuickJS Javascript Engine API list` located in `[Ordinal/Name Pointer] Table`\r\n\r\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;Check `quickjs.h` to see what these APIs were defined for\r\n\r\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;**Tips:** (I think there is no need to do following any more)\r\n\r\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;When trying to load `libquickjs.dll` outside `MSYS2`/`MINGW64`/`MINGW32`\r\n\r\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;if encountered `OSError: [Error 126] The specified module could not be found.`\r\n\r\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;try to find dlls that `libquickjs.dll` depends on with\r\n```\r\n  objdump -p libquickjs.dll | grep -E .dll\r\n  objdump -p libquickjs.dll | findstr /c:.dll\r\n```\r\n\r\n* An alternative way to `make`\r\n\r\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;**Launch Command Prompt as Administrator**\r\n```\r\n  cd /d …\\msys64\\mingw64\\bin\r\n  mklink make.exe mingw32-make.exe\r\n\r\n  cd /d …\\msys64\\mingw32\\bin\r\n  mklink make.exe mingw32-make.exe\r\n```\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmengmo%2Fquickjs-windows-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmengmo%2Fquickjs-windows-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmengmo%2Fquickjs-windows-build/lists"}