{"id":29906205,"url":"https://github.com/spinframework/js-wasi-ext","last_synced_at":"2025-08-01T20:40:05.641Z","repository":{"id":243069379,"uuid":"791565064","full_name":"spinframework/js-wasi-ext","owner":"spinframework","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-12T08:45:48.000Z","size":258,"stargazers_count":3,"open_issues_count":1,"forks_count":3,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-07-02T11:07:59.269Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/spinframework.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}},"created_at":"2024-04-25T00:19:45.000Z","updated_at":"2025-05-12T08:55:50.000Z","dependencies_parsed_at":"2025-05-12T09:59:52.197Z","dependency_job_id":"6c20b543-dcdd-4125-a41c-e06fd6321345","html_url":"https://github.com/spinframework/js-wasi-ext","commit_stats":null,"previous_names":["fermyon/js-wasi-ext","spinframework/js-wasi-ext"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/spinframework/js-wasi-ext","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spinframework%2Fjs-wasi-ext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spinframework%2Fjs-wasi-ext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spinframework%2Fjs-wasi-ext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spinframework%2Fjs-wasi-ext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spinframework","download_url":"https://codeload.github.com/spinframework/js-wasi-ext/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spinframework%2Fjs-wasi-ext/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268293324,"owners_count":24227413,"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-08-01T02:00:08.611Z","response_time":67,"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":[],"created_at":"2025-08-01T20:40:00.753Z","updated_at":"2025-08-01T20:40:05.619Z","avatar_url":"https://github.com/spinframework.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `js-wasi-ext`\n\nThis is a library compatible with WASI 0.2 that makes select Node.js APIs available in\n[ComponentizeJS](https://github.com/bytecodealliance/componentizeJS/) and\n[StarlingMonkey](https://github.com/bytecodealliance/starlingmonkey).\n\n## Usage\n\nThis library currently requires Webpack and uses a plugin to define the fall backs.:\n\n```js\nimport WasiExtPlugin from \"@spinframework/wasi-ext/plugin/index.js\";\n\nexport default config = () =\u003e {\n    ...\n    return {\n        ...\n        plugins: [\n            new WasiExtPlugin()\n        ],\n        ...\n    }\n}\n\n```\n\n\u003e Note: this currently does not support the `node:process` syntax yet.\n\nBecause accessing environment variables needs to happen at runtime (not during\npre-initialization), the actual environment variables can only be accessed from\nthe handler function. If accessed outside, that is not supported (and currently,\n`process.env` returns an empty map; we can discuss what this behavior should be).\n\nThe library currently exports a `setupExt()` function that explicitly initializes\n`process.env` from the handler. We could potentially remove that depending on the\ndesired experience of this library.\n\nAfter setup:\n\n```js\nimport process from \"process\";\n\n...\nconsole.log(process.env[\"PET\"]);\n```\n\n## Supported APIs\n\n* `process`: certain methods are no-ops and few throw exceptions. For detailed list refer to the [upstream library](https://github.com/defunctzombie/node-process/blob/master/browser.js). `process.env` is only populated when inside the handler function, when outside, it returns an empty object (i.e) `{}`\n* `fs`: Limited to `readFileSync` and `readdirSync`\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspinframework%2Fjs-wasi-ext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspinframework%2Fjs-wasi-ext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspinframework%2Fjs-wasi-ext/lists"}