{"id":18016537,"url":"https://github.com/webassembly/wasi-libc","last_synced_at":"2025-05-14T14:10:34.416Z","repository":{"id":38819108,"uuid":"166244463","full_name":"WebAssembly/wasi-libc","owner":"WebAssembly","description":"WASI libc implementation for WebAssembly","archived":false,"fork":false,"pushed_at":"2025-05-12T23:38:14.000Z","size":3514,"stargazers_count":909,"open_issues_count":91,"forks_count":209,"subscribers_count":53,"default_branch":"main","last_synced_at":"2025-05-13T13:07:49.502Z","etag":null,"topics":["wasi"],"latest_commit_sha":null,"homepage":"https://wasi.dev","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WebAssembly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2019-01-17T15:02:57.000Z","updated_at":"2025-05-12T11:48:10.000Z","dependencies_parsed_at":"2023-09-27T21:27:18.356Z","dependency_job_id":"7ed303c5-d218-49f8-a17a-027b6d48d418","html_url":"https://github.com/WebAssembly/wasi-libc","commit_stats":{"total_commits":406,"total_committers":49,"mean_commits":8.285714285714286,"dds":0.5615763546798029,"last_synced_commit":"574b88da481569b65a237cb80daf9a2d5aeaf82d"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebAssembly%2Fwasi-libc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebAssembly%2Fwasi-libc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebAssembly%2Fwasi-libc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebAssembly%2Fwasi-libc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WebAssembly","download_url":"https://codeload.github.com/WebAssembly/wasi-libc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254160559,"owners_count":22024571,"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":["wasi"],"created_at":"2024-10-30T04:18:23.726Z","updated_at":"2025-05-14T14:10:29.404Z","avatar_url":"https://github.com/WebAssembly.png","language":"C","readme":"# `wasi-libc`\n\n`wasi-libc` is a libc for WebAssembly programs built on top of WASI system\ncalls. It provides a wide array of POSIX-compatible C APIs, including support\nfor standard I/O, file I/O, filesystem manipulation, memory management, time,\nstring, environment variables, program startup, and many other APIs.\n\n`wasi-libc` is sufficiently stable and usable for many purposes, as most of the\nPOSIX-compatible APIs are stable, though it is continuing to evolve to better\nalign with wasm and WASI. For example, pthread support is experimentally\nprovided via the [wasi-threads] proposal.\n\n[wasi-threads]: https://github.com/WebAssembly/wasi-threads\n\n## Usage\n\nThe easiest way to get started with this is to use [wasi-sdk], which includes a\nbuild of `wasi-libc` in its sysroot.\n\n## Building from source\n\nTo build a WASI sysroot from source, obtain a WebAssembly-supporting C compiler\n(currently this is only clang 10+, though we'd like to support other compilers\nas well), and then run:\n\n```sh\nmake CC=/path/to/clang/with/wasm/support \\\n     AR=/path/to/llvm-ar \\\n     NM=/path/to/llvm-nm\n```\n\nThis makes a directory called \"sysroot\" by default. See the top of the Makefile\nfor customization options.\n\nTo use the sysroot, use the `--sysroot=` option:\n\n```sh\n/path/to/wasm/supporting/c/compiler --sysroot=/path/to/the/newly/built/sysroot ...\n```\n\nto run the compiler using the newly built sysroot.\n\nNote that Clang packages typically don't include cross-compiled builds of\ncompiler-rt, libcxx, or libcxxabi, for `libclang_rt.builtins-wasm32.a`,\n`libc++.a`, or `libc++abi.a`, respectively, so they may not be usable without\nextra setup. This is one of the things [wasi-sdk] simplifies, as it includes\ncross-compiled builds of compiler-rt, `libc++.a`, and `libc++abi.a`.\n\n## Building in pthread support\n\nTo enable pthreads support via the [wasi-threads] proposal, follow the above\nbuild directions with one addition: `make ... THREAD_MODEL=posix`. This creates\nadditional artifacts in `sysroot/lib/wasm32-wasi-threads` to support `--target\nwasm32-wasi-threads`.\n\n## Arch Linux AUR package\n\nFor Arch Linux users, there's an official [wasi-libc] package tracking this Git\nrepository. You might want to install other [WASI related packages] as well.\n\n[wasi-sdk]: https://github.com/WebAssembly/wasi-sdk\n[wasi-libc]: https://archlinux.org/packages/extra/any/wasi-libc/\n[WASI related packages]: https://archlinux.org/packages/?q=wasi-\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebassembly%2Fwasi-libc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebassembly%2Fwasi-libc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebassembly%2Fwasi-libc/lists"}