{"id":13628775,"url":"https://github.com/ldarren/QuickJS","last_synced_at":"2025-04-17T04:32:24.849Z","repository":{"id":143155964,"uuid":"196513785","full_name":"ldarren/QuickJS","owner":"ldarren","description":"QuickJS is a small and embeddable Javascript engine. QuickJS sources are copyright Fabrice Bellard and Charlie Gordon.","archived":false,"fork":false,"pushed_at":"2023-10-29T19:34:38.000Z","size":2243,"stargazers_count":573,"open_issues_count":8,"forks_count":24,"subscribers_count":10,"default_branch":"mod","last_synced_at":"2025-04-05T06:09:56.913Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ldarren.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-07-12T05:24:19.000Z","updated_at":"2025-03-19T06:41:29.000Z","dependencies_parsed_at":"2024-01-06T00:11:52.493Z","dependency_job_id":null,"html_url":"https://github.com/ldarren/QuickJS","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldarren%2FQuickJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldarren%2FQuickJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldarren%2FQuickJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldarren%2FQuickJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ldarren","download_url":"https://codeload.github.com/ldarren/QuickJS/tar.gz/refs/heads/mod","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249315989,"owners_count":21249868,"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-08-01T22:00:57.345Z","updated_at":"2025-04-17T04:32:19.838Z","avatar_url":"https://github.com/ldarren.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"Original code is located at `master` branch\n\n# Installation\n## Ubuntu\n- `sudo apt-get install -y build-essential gcc-multilib`\n- `cd {/YOUR/PATH/TO/}QuickJS`\n- `make`\n- `sudo make install` # to use qjs and qjsc outside of repo folder\n\n## Mac\n- `mod` branch contained mac fixes for undefined `environ` in `./quickjs-libc.c`\n- update xcode\n- `make`\n- `sudo make install` # to use qjs and qjsc outside of repo folder\n\n# Getting Started\n## compile js to binary\ncreate a hello\\_world1.js javascript file\n```javascript\nconsole.log('Hello World')\n```\ngoto command line and type\n```bash\n\u003e ./qjsc -o hello_world1 ./hello_world1.js\n\u003e ./hello_world1\n\u003e Hello World\n```\n\n## compile js with module to binary\ncreate a hello\\_world2.js javascript file\n```javascript\nimport * as std from 'std'\nconsole.log(std.getenv('msg'))\n```\ngoto command line and type\n```bash\n\u003e ./qjsc -o hello_world2 ./hello_world2.js\n\u003e SyntaxError: unsupported keyword: import\n\u003e ./qjsc -m -o hello_world2 ./hello_world2.js\n\u003e msg=\"Hello World w Import\" ./hello_world2\n\u003e Hello World w Import\n```\n\n# known issues\n- doesn't support Blob\n- doesn't support WebWorker\n- exceptions in promise are silent. use `./qjs --unhandled-rejection {script.js}` to display exceptions\n- doesn't handle `Maximum call stack size exceeded` for recursive async function correctly. it crashes with segmentation error\n\n# fun facts\n- compiled executable of `qjsc` does not has speed advantage compared with interpreting script with `qjs`\n\ntest it yourself\n ```\n # run benchmark with interpretor\n ./qjs tests/microbench.js\n \n # run benchmark with compiler\n ./qjsc -o microbench tests/microbench.js\n ./microbench\n ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldarren%2FQuickJS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fldarren%2FQuickJS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldarren%2FQuickJS/lists"}