{"id":15647493,"url":"https://github.com/djdeveloperr/deno_win32","last_synced_at":"2025-04-30T13:14:10.373Z","repository":{"id":62316446,"uuid":"544428788","full_name":"DjDeveloperr/deno_win32","owner":"DjDeveloperr","description":"Fast and complete Win32 API bindings for Deno using FFI","archived":false,"fork":false,"pushed_at":"2023-06-03T04:37:38.000Z","size":19388,"stargazers_count":48,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-25T08:01:39.389Z","etag":null,"topics":["bindings","deno","ffi","hacktoberfest","win32","windows"],"latest_commit_sha":null,"homepage":"","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/DjDeveloperr.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}},"created_at":"2022-10-02T13:05:33.000Z","updated_at":"2025-02-06T23:21:14.000Z","dependencies_parsed_at":"2024-10-03T12:19:50.319Z","dependency_job_id":"02b75ea9-3f1c-41a7-87a0-3b77269157fd","html_url":"https://github.com/DjDeveloperr/deno_win32","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DjDeveloperr%2Fdeno_win32","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DjDeveloperr%2Fdeno_win32/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DjDeveloperr%2Fdeno_win32/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DjDeveloperr%2Fdeno_win32/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DjDeveloperr","download_url":"https://codeload.github.com/DjDeveloperr/deno_win32/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242656037,"owners_count":20164431,"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":["bindings","deno","ffi","hacktoberfest","win32","windows"],"created_at":"2024-10-03T12:19:39.069Z","updated_at":"2025-03-09T06:33:05.207Z","avatar_url":"https://github.com/DjDeveloperr.png","language":"TypeScript","funding_links":["https://github.com/sponsors/DjDeveloperr"],"categories":[],"sub_categories":[],"readme":"# Deno Win32\n\n[![Tags](https://img.shields.io/github/release/DjDeveloperr/deno_win32)](https://github.com/DjDeveloperr/deno_win32/releases)\n[![Checks](https://github.com/DjDeveloperr/deno_win32/actions/workflows/ci.yml/badge.svg)](https://github.com/DjDeveloperr/deno_win32/actions/workflows/ci.yml)\n[![License](https://img.shields.io/github/license/DjDeveloperr/deno_win32)](https://github.com/DjDeveloperr/deno_win32/blob/master/LICENSE)\n[![Sponsor](https://img.shields.io/static/v1?label=Sponsor\u0026message=%E2%9D%A4\u0026logo=GitHub\u0026color=%23fe8e86)](https://github.com/sponsors/DjDeveloperr)\n\nFast and complete Win32 API bindings for Deno using FFI.\n\n## Example\n\n```ts\nimport {\n  MB_OKCANCEL,\n  MessageBoxA,\n} from \"https://win32.deno.dev/0.4.1/UI.WindowsAndMessaging\";\n\nconst result = MessageBoxA(\n  null,\n  \"Hello, world!\",\n  \"Hello\",\n  MB_OKCANCEL,\n); // 1 (OK) or 2 (Cancel)\n```\n\nMore in `examples/` such as demonstrating OpenGL API usage.\n\n## Usage\n\nYou need to pass `--allow-ffi` and `--unstable` flags in order to access the\nWin32 API.\n\n```sh\ndeno run --allow-ffi --unstable \u003cfile\u003e\n```\n\nNote: It is highly recommended to import only APIs you need. Do not import from\n`mod.ts` as it will import all sub modules which you might not even need. WinAPI\nis huge, so are the bindings.\n\n## Documentation\n\nIt is recommened to read the official documentation of\n[Win32 API](https://learn.microsoft.com/en-us/windows/win32/api/).\n\nAPIs almost map 1:1 with the official ones, just certain types have to be\ntransformed to be sent into C-land like `string` is first converted into\nnull-terminated string depending on the argument (PSTR or PWSTR).\n\nConstants are exported as-is. Structs are defined as interfaces with\ncorresponding JS types in fields. We also export a helper function\n`alloc${STRUCT}` which accepts `Partial\u003c${STRUCT}\u003e` to create a new struct and\nreturn its buffer as `Uint8Array`. A constant called `sizeof${camelCasedStruct}`\nis exported which is the size of the struct in bytes.\n\nSome APIs have been (manually) marked as Async capable which adds a\n`${name}Async` variant of the function along with original one which runs on a\ndifferent thread natively and returns a promise. If you want any other API to be\nAsync capable, please open an issue or a PR. Note that Async calls cannot go\nthrough v8 fastapi path, so they have more overhead than normal ones.\n\n## Contributing\n\nCode is formatted using `deno fmt` and linted using `deno lint`. Please make\nsure to run these commands before committing.\n\n## License\n\nApache-2.0. Check [LICENSE](LICENSE) for more details.\n\nCopyright 2022-2023 © DjDeveloperr\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjdeveloperr%2Fdeno_win32","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjdeveloperr%2Fdeno_win32","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjdeveloperr%2Fdeno_win32/lists"}