{"id":13520690,"url":"https://github.com/jedisct1/as-wasi","last_synced_at":"2025-12-27T16:07:41.722Z","repository":{"id":40692372,"uuid":"177994121","full_name":"jedisct1/as-wasi","owner":"jedisct1","description":"An AssemblyScript API layer for WASI system calls.","archived":false,"fork":false,"pushed_at":"2023-03-15T19:34:55.000Z","size":409,"stargazers_count":251,"open_issues_count":9,"forks_count":18,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-05-21T12:41:29.908Z","etag":null,"topics":["assemblyscript","wasi","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/jedisct1.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}},"created_at":"2019-03-27T12:53:13.000Z","updated_at":"2024-02-09T21:49:40.000Z","dependencies_parsed_at":"2024-01-16T14:04:12.173Z","dependency_job_id":"190cd1cd-66c8-4d9c-8269-c918077626a4","html_url":"https://github.com/jedisct1/as-wasi","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Fas-wasi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Fas-wasi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Fas-wasi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Fas-wasi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jedisct1","download_url":"https://codeload.github.com/jedisct1/as-wasi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247957078,"owners_count":21024646,"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":["assemblyscript","wasi","wasm","webassembly"],"created_at":"2024-08-01T06:00:20.178Z","updated_at":"2025-12-27T16:07:41.717Z","avatar_url":"https://github.com/jedisct1.png","language":"TypeScript","funding_links":[],"categories":["Packages","Utilities","TypeScript"],"sub_categories":[],"readme":"# as-wasi\n\n\u003c!--- Badges --\u003e\n\n![npm version](https://img.shields.io/npm/v/as-wasi.svg)\n![npm downloads per month](https://img.shields.io/npm/dm/as-wasi.svg)\n![GitHub License](https://img.shields.io/github/license/torch2424/as-wasi.svg)\n\n\u003c!--- Short Description--\u003e\n\nA high-level AssemblyScript layer for the WebAssembly System Interface (WASI).\n\n[WASI](https://wasi.dev) is an API providing access to the external world to WebAssembly modules. AssemblyScript exposes the low-level WASI standard set of system calls. `as-wasi` builds a higher level API on top of the AssemblyScript WASI interface, at a similar level to the [Node API](https://nodejs.org/docs/latest/api/).\n\n## Installation\n\nYou can install `as-wasi` in your project by running the following:\n\n`npm install --save as-wasi`\n\n## Quick Start\n\nExample usage of the `Console` and `Environ` classes:\n\n```typescript\n// Import from the installed as-wasi package\nimport { Console, Environ } from \"as-wasi/assembly\";\n\n// Create an environ instance\nlet env = new Environ();\n\n// Get the HOME Environment variable\nlet home = env.get(\"HOME\")!;\n\n// Log the HOME string to stdout\nConsole.log(home);\n```\n\nHere are some exported classes that are commonly used:\n\n* `FileSystem` - Reading and Writing the user's fileystem.\n* `Console` - General logging to stdout and stderr.\n* `Environ` - Accessing environment variables, command flags, etc...\n* `Date` - Getting the current system time.\n* `Random` - Accessing random numbers.\n* `Time` - Allow sleeping and waiting for events to occur.\n* And More! See the Reference API in the next section for the full API.\n\n## Reference API Docs\n\nReference API documentation can be found in [REFERENCE_API_DOCS](./REFERENCE_API_DOCS.md). Documentation is generated using [typedoc](https://typedoc.org/).\n\n## Projects using as-wasi\n\n* [wasmboy](https://github.com/torch2424/wasmboy) - Game Boy / Game Boy Color Emulator Library, written for WebAssembly using AssemblyScript.\n* [wasmerio/io-devices-lib](https://github.com/wasmerio/io-devices-lib) - Library for interacting with the Wasmer Experimental IO Devices API. Uses WASI for outputting graphics in a framebuffer, and handles mouse/keyboard input.\n* [wasm-by-example](https://github.com/torch2424/wasm-by-example) - Wasm By Example is a website with a set of hands-on introduction examples and tutorials for WebAssembly (Wasm). Wasm By Example features `as-wasi` by default for the AssemblyScript WASI examples.\n* [wasm-matrix](https://github.com/torch2424/wasm-matrix) - A Matrix effect in your terminal using AssemblyScript and WASI. This project is a bit older, and uses an older version of `as-wasi`, but still creates a cool effect!\n\n_If your project is using as-wasi, and you would like to be featured here. Please open a pull request against the README with links to your project, and if appropriate, explaining how as-wasi is being used._\n\n## Contributing\n\nContributions are definitely welcome! Feel free to open a PR for small fixes such as typos and things. Larger fixes, or new features should start out as an issue for discussion, in which then a PR should be made.\n\nThis project will also adhere to the [AssemblyScript Code of Conduct](https://github.com/AssemblyScript/assemblyscript/blob/master/CODE_OF_CONDUCT.md).\n\n## License\n\n[MIT](https://oss.ninja/mit/jedisct1).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedisct1%2Fas-wasi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjedisct1%2Fas-wasi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedisct1%2Fas-wasi/lists"}