{"id":30143195,"url":"https://github.com/etdon/winj","last_synced_at":"2025-08-11T06:51:57.850Z","repository":{"id":308255200,"uuid":"866000095","full_name":"etdon/winj","owner":"etdon","description":"Java library utilizing the FFM API to provide high and low level API bindings as well as utilities for the Windows platform.","archived":false,"fork":false,"pushed_at":"2025-08-04T23:21:26.000Z","size":244,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-05T01:14:12.923Z","etag":null,"topics":["ffm","win-api","win32","windows","windows-api","windows-utility"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/etdon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-10-01T13:31:35.000Z","updated_at":"2025-08-04T23:21:29.000Z","dependencies_parsed_at":"2025-08-05T01:14:15.392Z","dependency_job_id":"4f23200a-03a4-4d1b-aaf4-fa0254450108","html_url":"https://github.com/etdon/winj","commit_stats":null,"previous_names":["etdon/winj"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/etdon/winj","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etdon%2Fwinj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etdon%2Fwinj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etdon%2Fwinj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etdon%2Fwinj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/etdon","download_url":"https://codeload.github.com/etdon/winj/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etdon%2Fwinj/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269843729,"owners_count":24484117,"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-11T02:00:10.019Z","response_time":75,"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":["ffm","win-api","win32","windows","windows-api","windows-utility"],"created_at":"2025-08-11T06:51:53.219Z","updated_at":"2025-08-11T06:51:57.811Z","avatar_url":"https://github.com/etdon.png","language":"Java","readme":"\u003cp align=\"center\"\u003e  \n    \u003cimg src=\"https://i.imgur.com/8rpcn5R.png\"\u003e    \n\u003c/p\u003e\n\n## Introduction\n\n\u003cb\u003ewinj\u003c/b\u003e is your go-to Java library for seamless Windows API access, leveraging the FFM API. With zero third-party\nruntime dependencies, it offers an easy-to-use interface that simplifies native functionality integration, allowing\ndevelopers to harness the full power of Windows effortlessly.\n\n## Details\n\n- Gives the user more control over the memory (de)allocation through extensive use of arenas.\n- Bindings are provided for both higher level API functions and types as well as lower level ones which are often\n  completely missing in similar libraries.\n- Function calls and types are constructed cleanly with fluent builders.\n- Facades (`facade` module) are built around more complex and constant flows like hook management as well\n  as logically tied components.\n- Lightweight with zero third-party runtime dependencies (less than 1 MB in compiled size).\n\n## Warnings\n\n- The bindings are far from complete, you can however define new bindings in your own project without modifying the library directly.\n- No production promises: Names and locations might change, things might get refactored changing the fundamental structure. Published\nfull release versions will remain untouched (unless critical fixes are needed) and changes will only be shipped with the next version.\nSnapshot versions might change at any time.\n  \n## Examples\n\n```java\n// Re-usable\nfinal WindowsAPI windowsAPI = WindowsAPI.of(arena);\nfinal NativeContext nativeContext = NativeContext.of(arena, this.nativeCaller);\n\nfinal Window window = windowsAPI.getForegroundWindow();\nfinal String windowText = window.getText(nativeContext);\n```\n```java\nfinal MemorySegment windowHandle = (MemorySegment) this.nativeCaller.call(\n    CreateWindowExW.builder()\n        .className(className)\n        .windowName(windowName)\n        .moduleHandle(moduleHandle)\n        .style(\n            Flag.combine(\n                WindowStyle.WS_SYSMENU,\n                WindowStyle.WS_CAPTION,\n                WindowStyle.WS_BORDER\n            )\n        )\n        .build()\n);\n\nthis.nativeCaller.call(\n    ShowWindow.builder()\n        .handle(windowHandle)\n        .presentation(WindowPresentation.SW_SHOW)\n        .build()\n);\n```\n```java\nShellcode.builder()\n    .mov(Register.R12, shellcodeHelper.getFunctionAddress(Library.KERNEL_32, \"WinExec\"))\n    .sub(Register.RSP, (byte) 0x20)\n    .call(Register.R12)\n    .xor(Register.RCX, Register.RCX)\n    .mov(Register.R13, shellcodeHelper.getFunctionAddress(Library.KERNEL_32, \"ExitProcess\"))\n    .call(Register.R13)\n    .build();\n```\n\n## Getting Started\n\n\u003e [!NOTE]    \n\u003e 👷 winj is in early development and currently **not** feature complete.\n\n\u003e [!IMPORTANT]\n\u003e Requirements:\n\u003e - Java 22\u003cp\u003e\n\u003e ℹ️ *Java 22 (non-LTS) has been prioritized over Java 21 (LTS) because of the finalization of the FFM API.*\n\n🪶 Maven:\n\n```xml\n\u003crepository\u003e\n    \u003cid\u003eetdon-repo\u003c/id\u003e\n    \u003curl\u003ehttps://repo.etdon.com/repository/maven-snapshots/\u003c/url\u003e\n\u003c/repository\u003e\n```\n\n```xml\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.etdon.winj\u003c/groupId\u003e\n        \u003cartifactId\u003ecore\u003c/artifactId\u003e\n        \u003cversion\u003e1.0.1-SNAPSHOT\u003c/version\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.etdon.winj\u003c/groupId\u003e\n        \u003cartifactId\u003efacade\u003c/artifactId\u003e\n        \u003cversion\u003e1.0.1-SNAPSHOT\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n🐘 Gradle:\n\n```groovy\nmaven {\n    url = uri(\"https://repo.etdon.com/repository/maven-snapshots/\")\n}\n```\n\n```groovy\ndependencies {\n    implementation 'com.etdon.winj:core:1.0.1-SNAPSHOT'\n    implementation 'com.etdon.winj:facade:1.0.1-SNAPSHOT'\n}\n```\n\nRequired VM Options:\n\n```xml\n\u003cmanifestEntries\u003e\n    \u003cEnable-Native-Access\u003eALL-UNNAMED\u003c/Enable-Native-Access\u003e\n\u003c/manifestEntries\u003e\n```\n\n```\n--enable-native-access=ALL-UNNAMED\n```\n\n## 📦 Building\n\nThe build management tool used for this project is [Apache Maven](https://maven.apache.org/). Executing the following\ncommand will install the compiled artifact into your local repository if no critical issues occur during any of the\nlifecycle phases.\n\n```\nmvn clean install\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetdon%2Fwinj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fetdon%2Fwinj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetdon%2Fwinj/lists"}