{"id":28471469,"url":"https://github.com/hirofa/greencopperruntime","last_synced_at":"2025-09-22T21:37:50.381Z","repository":{"id":40666322,"uuid":"339120127","full_name":"HiRoFa/GreenCopperRuntime","owner":"HiRoFa","description":"Javascript runtime library built in rust which can be used with quickjs","archived":false,"fork":false,"pushed_at":"2025-06-10T10:19:16.000Z","size":81152,"stargazers_count":23,"open_issues_count":11,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-01T21:37:18.013Z","etag":null,"topics":["es6","fetch","fetch-api","javascript","javascript-runtime","libr","modules","promises","quickjs","quickjs-runtime","runtime","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/HiRoFa.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":"2021-02-15T15:26:49.000Z","updated_at":"2025-06-16T20:16:09.000Z","dependencies_parsed_at":"2024-01-16T12:33:37.316Z","dependency_job_id":"fd6a41a2-5598-4987-b556-5781454fef12","html_url":"https://github.com/HiRoFa/GreenCopperRuntime","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HiRoFa/GreenCopperRuntime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiRoFa%2FGreenCopperRuntime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiRoFa%2FGreenCopperRuntime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiRoFa%2FGreenCopperRuntime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiRoFa%2FGreenCopperRuntime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HiRoFa","download_url":"https://codeload.github.com/HiRoFa/GreenCopperRuntime/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiRoFa%2FGreenCopperRuntime/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276481036,"owners_count":25649986,"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","status":"online","status_checked_at":"2025-09-22T02:00:08.972Z","response_time":79,"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":["es6","fetch","fetch-api","javascript","javascript-runtime","libr","modules","promises","quickjs","quickjs-runtime","runtime","rust"],"created_at":"2025-06-07T10:40:28.254Z","updated_at":"2025-09-22T21:37:50.358Z","avatar_url":"https://github.com/HiRoFa.png","language":"Rust","readme":"# GreenCopperRuntime\n\n**Just to get thing clear straight away, this is a very much work in progress project, nothing is definitive, it might never become definitive**\n\n# Roadmap / The plan\n\nGreenCopperRuntime is a library which adds additional features to a QuickJs JavaScript runtime.\n\nGreenCopperRuntime is based on [quickjs_runtime](https://github.com/HiRoFa/quickjs_es_runtime)\n\n## Other GreenCopper projects\n\n[GreenCopperCmd](https://github.com/HiRoFa/GreenCopperCmd) is a commandline utility which you can use to run js/ts files with GreenCopper\n\n# Default implementations\n\nGreenCopperRuntime provides implementations for abstract features of the Runtimes like:\n* [x] [FileSystemModuleLoader](https://hirofa.github.io/GreenCopperRuntime/green_copper_runtime/moduleloaders/struct.FileSystemModuleLoader.html)\n* [x] [HTTPModuleLoader](https://hirofa.github.io/GreenCopperRuntime/green_copper_runtime/moduleloaders/struct.HttpModuleLoader.html)\n* [x] [HTTPFetch](https://hirofa.github.io/GreenCopperRuntime/green_copper_runtime/features/js_fetch/index.html) (http capable implementation of fetch api)\n\n### Preprocessing\n\nGreenCopperRuntime provides script pre-processing for:\n* [x] cpp style preprocessing (e.g. use #ifdef $GRECO_DEBUG in code) ([DOCS](https://hirofa.github.io/GreenCopperRuntime/green_copper_runtime/preprocessors/cpp))\n* [ ] macros which generate script before eval \n* [x] Typescript support is implemented as a separate optional project [typescript_utils](https://github.com/HiRoFa/typescript_utils) \n\nThe following features are optionally added by specifying them in your Cargo.toml\n\n* [x] [HTML Dom](https://hirofa.github.io/GreenCopperRuntime/green_copper_runtime/modules/htmldom/index.html) (Work in progress)\n* [ ] crypto\n  * [x] crypto.randomUUID()\n  * [ ] crypto.subtle\n* [x] JWT (Work in progress)\n* [ ] db\n  * [x] [mysql](https://hirofa.github.io/GreenCopperRuntime/green_copper_runtime/modules/db/mysql) (Work in progress)\n    * [x] single query (named and positional params)\n    * [x] execute (batch)\n    * [x] transactions\n  * [ ] cassandra\n  * [ ] redis\n* [ ] com\n  * [ ] [http](https://hirofa.github.io/GreenCopperRuntime/green_copper_runtime/modules/com/http) (Work in progress, was deleted due to fetch being done first. will review this func later for advanced things like client certs)\n  * [ ] sockets\n* [ ] io\n  * [x] [gpio](https://hirofa.github.io/GreenCopperRuntime/green_copper_runtime/modules/io/gpio) (Work in progress)\n  * [x] [fs](https://hirofa.github.io/GreenCopperRuntime/green_copper_runtime/modules/io/fs) (Work in progress)\n* [ ] libloading\n  * [ ] libc\n  * [ ] java\n  * [ ] npm\n    * [x] [commonjs](https://hirofa.github.io/GreenCopperRuntime/green_copper_runtime/features/require) \n* [ ] utilities\n  * [ ] caching\n    * [x] cache (WiP)\n    \n# Getting started\n\n// wip\n\n## Cargo.toml\n\nIn your cargo.toml you can add the green_copper dependency and specify the runtimes you want to use (as features)\n\n```toml\ngreen_copper_runtime =  { git = 'https://github.com/HiRoFa/GreenCopperRuntime', branch=\"main\", features = [\"engine_quickjs\"]}\nquickjs_runtime = {git = 'https://github.com/HiRoFa/quickjs_es_runtime', branch=\"main\"}\n```\n\n## Main api concepts\n\n// wip\n\nGreenCopper based runtimes all split the API into two distinct halves, first of all there are your outer thread-safe API's which do not directly call the underlying runtime, These are the\n* [QuickJsRuntimeFacade](https://hirofa.github.io/GreenCopperRuntime/hirofa_utils/js_utils/facades/trait.JsRuntimeFacade.html) (represents a Runtime)\n* [JsValueFacade](https://hirofa.github.io/GreenCopperRuntime/hirofa_utils/js_utils/facades/values/enum.JsValueFacade.html) (represents a Value)\n\nAll of these work (with some exeptions) by adding a job to an EventLoop (a member of the JsRuntimeFacade) and getting the result async (the API returns a Future).\n\nThese jobs run in a single thread per runtime and provide access to the Adapters which DO interact with the actual Runtime/Context/Value directly, these are:\n* [QuickJsRuntimeAdapter](https://hirofa.github.io/GreenCopperRuntime/hirofa_utils/js_utils/adapters/trait.JsRuntimeAdapter.html) (represents a Runtime)\n* [QuickJsRealmAdapter](https://hirofa.github.io/GreenCopperRuntime/hirofa_utils/js_utils/adapters/trait.JsRealmAdapter.html) (represents a Context or Realm)\n* [QuickJsValueAdapter](https://hirofa.github.io/GreenCopperRuntime/hirofa_utils/js_utils/adapters/trait.JsValueAdapter.html) (represents a Value)\n\n## Example\n\n// todo\n\n## Adding features\n\n// wip\n\n### Functions\n\n// wip\n\n### Proxy classes\n\n// wip\n\n### Modules\n\n// wip","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirofa%2Fgreencopperruntime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhirofa%2Fgreencopperruntime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirofa%2Fgreencopperruntime/lists"}