{"id":30277181,"url":"https://github.com/ysdragon/webview","last_synced_at":"2025-08-16T11:14:16.001Z","repository":{"id":305885466,"uuid":"1024268658","full_name":"ysdragon/webview","owner":"ysdragon","description":"Create beautiful, cross-platform desktop apps with Ring and web technologies","archived":false,"fork":false,"pushed_at":"2025-08-06T07:27:15.000Z","size":3376,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-06T08:42:42.639Z","etag":null,"topics":["desktop","ring","ring-programming-language","webview","webview2"],"latest_commit_sha":null,"homepage":"","language":"Ring","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/ysdragon.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":"2025-07-22T12:42:47.000Z","updated_at":"2025-08-06T07:27:19.000Z","dependencies_parsed_at":"2025-08-06T08:37:13.963Z","dependency_job_id":null,"html_url":"https://github.com/ysdragon/webview","commit_stats":null,"previous_names":["ysdragon/webview"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ysdragon/webview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysdragon%2Fwebview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysdragon%2Fwebview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysdragon%2Fwebview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysdragon%2Fwebview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ysdragon","download_url":"https://codeload.github.com/ysdragon/webview/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysdragon%2Fwebview/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270702562,"owners_count":24630877,"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-16T02:00:11.002Z","response_time":91,"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":["desktop","ring","ring-programming-language","webview","webview2"],"created_at":"2025-08-16T11:14:14.758Z","updated_at":"2025-08-16T11:14:15.987Z","avatar_url":"https://github.com/ysdragon.png","language":"Ring","readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"img/logo.png\" alt=\"WebView Logo\" width=\"200\"\u003e\n\n# WebView\n\nCreate beautiful, cross-platform desktop apps with Ring and web technologies.\n\n[language-ring]: https://img.shields.io/badge/language-Ring-2D54CB.svg?style=for-the-badge\u0026labelColor=414868\n[build-status]: https://img.shields.io/github/actions/workflow/status/ysdragon/webview/ubuntu_build.yml?branch=main\u0026label=build\u0026style=for-the-badge\u0026labelColor=414868\u0026logoColor=C0CAF5\u0026color=8c73cc\n[last-commit]: https://img.shields.io/github/last-commit/ysdragon/webview?style=for-the-badge\u0026logo=github\u0026logoColor=C0CAF5\u0026labelColor=414868\u0026color=8c73cc\n[release-version]: https://img.shields.io/github/v/release/ysdragon/webview?style=for-the-badge\u0026logo=webtrees\u0026logoColor=C0CAF5\u0026labelColor=414868\u0026color=7664C6\n[license]: https://img.shields.io/github/license/ysdragon/webview?style=for-the-badge\u0026logo=opensourcehardware\u0026label=License\u0026logoColor=C0CAF5\u0026labelColor=414868\u0026color=8c73cc\n[issues]: https://img.shields.io/github/issues/ysdragon/webview?color=8c73cc\u0026style=for-the-badge\u0026logo=github\u0026logoColor=C0CAF5\u0026labelColor=414868\n\n[![][language-ring]](https://ring-lang.github.io/)\n[![][build-status]](https://github.com/ysdragon/webview/actions)\n[![][last-commit]](https://github.com/ysdragon/webview/pulse)\n[![][release-version]](https://github.com/ysdragon/webview/releases/latest)\n[![][license]](https://github.com/ysdragon/webview/blob/main/LICENSE)\n[![][issues]](https://github.com/ysdragon/webview/issues)\n\n\u003c/div\u003e\n\nWebView is a powerful Ring library that allows you to create modern, cross-platform desktop applications using web technologies for the frontend, while using Ring as the backend. It provides a simple and intuitive API for building beautiful graphical user interfaces.\n\nThis project is made possible by the tiny [webview](https://github.com/webview/webview) library.\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch3\u003eDemo\u003c/h3\u003e\n  \u003ca href=\"examples/06_showcase.ring\"\u003e\n    \u003cimg src=\"img/showcase.gif\" alt=\"Application Demo\" width=\"600\"\u003e\n  \u003c/a\u003e\n  \u003cbr\u003e\n  \u003csub\u003e\n    \u003ca href=\"examples/06_showcase.ring\"\u003eView the source code for this demo\u003c/a\u003e\n  \u003c/sub\u003e\n\u003c/div\u003e\n\n## ✨ Features\n\n- **Cross-Platform:** Build applications for Windows, macOS, Linux, and FreeBSD from a single codebase.\n- **Modern UI:** Use familiar web technologies to design your user interface.\n- **Two-Way Binding:** Seamlessly call Ring functions from JavaScript and vice-versa.\n- **Easy to Use:** A simple and clean API makes it easy to get started.\n\n## 🚀 Getting Started\n\nFollow these instructions to get the WebView library up and running on your system.\n\n### Prerequisites\n\n- **[Ring](https://ring-lang.github.io/download.html):** Ensure you have Ring language version 1.23 or higher installed.\n\n### Installation\n\u003cdetails\u003e\n\u003csummary\u003eClick here for instructions on \u003cimg width=\"20\" height=\"20\" src=\"https://www.kernel.org/theme/images/logos/favicon.png\" /\u003e Linux\u003c/summary\u003e\n\nThe compiled Linux library in this package requires GTK 4 and WebkitGTK 6.\n\n*   **\u003cimg width=\"16\" height=\"16\" src=\"https://www.debian.org/favicon.ico\" /\u003eDebian-based:** `sudo apt install libgtk-4-1 libwebkitgtk-6.0-4`\n*   **\u003cimg width=\"16\" height=\"16\" src=\"https://archlinux.org/static/favicon.png\" /\u003eArch-based:** `sudo pacman -S gtk4 webkitgtk-6.0`\n*   **\u003cimg width=\"16\" height=\"16\" src=\"https://fedoraproject.org/favicon.ico\" /\u003eFedora:** `sudo dnf install gtk4 webkitgtk6.0`\n*   **\u003cimg width=\"16\" height=\"16\" src=\"https://voidlinux.org/assets/img/favicon.png\" /\u003eVoid Linux:** `sudo xbps-install gtk4 libwebkitgtk60`\n*   **\u003cimg width=\"16\" height=\"16\" src=\"https://www.alpinelinux.org/alpine-logo.ico\" /\u003eAlpine Linux:** `sudo apk add webkit2gtk-6.0`\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick here for instructions on \u003cimg width=\"20\" height=\"20\" src=\"https://blogs.windows.com/wp-content/uploads/prod/2022/09/cropped-Windows11IconTransparent512-32x32.png\" /\u003e Windows\u003c/summary\u003e\n\nThe compiled Windows library in this package does not bundle any webview version with itself but rather uses the system-installed one.\n\nThe [Microsoft Edge WebView2](https://developer.microsoft.com/en-us/microsoft-edge/webview2/) runtime is required to be installed on the system for any version of Windows before Windows 11. To manually update or install the latest version, follow the steps [here](https://github.com/MicrosoftEdge/WebView2Feedback/issues/3371#issuecomment-1500917825).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick here for instructions on \u003cimg width=\"20\" height=\"20\" src=\"https://www.freebsd.org/favicon.ico\" /\u003e FreeBSD\u003c/summary\u003e\n\nThe compiled FreeBSD library in this package requires WebKitGTK 6.\n\n*   **FreeBSD systems:** `sudo pkg install webkit2-gtk_60`\n\n\u003c/details\u003e\n\n- **Install the library using RingPM:**\n    ```sh\n    ringpm install webview from ysdragon\n    ```\n\n## 💻 Usage\n\nCreating a basic WebView application is straightforward. Here’s a simple example:\n\n```ring\n# Load the webview library\nload \"webview.ring\"\n\n# Create a new WebView instance.\noWebView = new WebView()\n\noWebView {\n    # Set the title of the native window.\n    setTitle(\"My First WebView App\")\n\n    # Set the size of the window (width, height, hint).\n    # WEBVIEW_HINT_NONE allows the window to be resized.\n    setSize(800, 600, WEBVIEW_HINT_NONE)\n\n    # Load HTML content into the webview.\n    setHtml(`\u003ch1\u003eWelcome to Ring WebView!\u003c/h1\u003e`)\n\n    # Run the main event loop. This will block until the window is closed.\n    run()\n}\n\n# This message will be displayed after the webview window is closed.\nsee \"Application Closed.\" + nl\n```\n\nThis code snippet creates a window, sets its title and size, loads some HTML, and runs the application loop.\n\nFor more advanced examples, see the [`examples/`](examples/) directory.\n\n## 📚 API Reference\n\nFor a detailed list of all available functions, classes, and methods, please refer to our [API reference documentation](docs/REFERENCE.md).\n\n## 📖 Usage Guide\n\nFor practical examples and guides on how to use the library, check out our [Usage Guide](docs/USAGE.md).\n\n## 🛠️ Development\n\nIf you want to contribute to the development of Ring WebView or build it from source, follow these steps.\n\n### Prerequisites\n\n- **CMake:** Version 3.16 or higher.\n- **C Compiler:** A C compiler compatible with your platform (e.g., GCC, Clang, MSVC).\n- **[Ring](https://github.com/ring-lang/ring):** You need to have the Ring language source code available on your machine.\n\n### Build Steps\n\n1. **Clone the Repository:**\n   Clone the WebView repository to your local machine.\n   ```sh\n   git clone https://github.com/ysdragon/webview.git --recursive\n   ```\n   \u003e **NOTE**: Skip this step if you have already installed the library using RingPM.\n\n2.  **Set the `RING` Environment Variable:**\n    Before running CMake, you must set the `RING` environment variable to point to the root directory of the Ring language source code.\n    - Windows\n      - Command Prompt\n          ```cmd\n          set RING=X:\\path\\to\\ring\n          ```\n      - PowerShell\n          ```powershell\n          $env:RING = \"X:\\path\\to\\ring\"\n          ```\n\n    - Unix\n      ```bash\n      export RING=/path/to/ring\n      ```\n\n3.  **Configure with CMake:**\n    Create a build directory and run CMake from within it.\n    ```sh\n    mkdir build\n    cd build\n    cmake ..\n    ```\n\n4.  **Build the Project:**\n    Compile the source code using the build toolchain configured by CMake (e.g., Make, Ninja).\n    ```sh\n    cmake --build .\n    ```\n\nThe compiled library will be placed in the `lib/\u003cos\u003e/\u003carch\u003e` directory.\n\n## 🤝 Contributing\n\nContributions are welcome! If you have ideas for improvements or have found a bug, please open an issue or submit a pull request.\n\n## 📄 License\n\nThis project is licensed under the MIT License. See the [`LICENSE`](LICENSE) file for details.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fysdragon%2Fwebview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fysdragon%2Fwebview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fysdragon%2Fwebview/lists"}