diff --git a/README.md b/README.md index 7d639c154..6a64a3a94 100644 --- a/README.md +++ b/README.md @@ -80,29 +80,88 @@ Think of WebUI like a WebView controller, but instead of embedding the WebView c ## Documentation - - [Online Documentation - C](https://webui.me/docs/#/c_api) - - [Online Documentation - C++](https://webui.me/docs/#/cpp_api) +- [Online Documentation - C](https://webui.me/docs/#/c_api) +- [Online Documentation - C++](https://webui.me/docs/#/cpp_api) ## Build - - [Windows](https://github.com/webui-dev/webui/tree/main/build/Windows) - - [Linux](https://github.com/webui-dev/webui/tree/main/build/Linux) - - [macOS](https://github.com/webui-dev/webui/tree/main/build/macOS) - +- Prerequisites + + `esbuild` + ```sh + npm i -g esbuild + ``` + + `xxd` - likely already installed\ + On macOS, it is installed by default. On other platforms, if vim is installed, it should be available on your system. To install xxd on Linux you can use your system's package manager. On Windows, please refer to this answer for installation methods: https://superuser.com/a/638850. + ```sh + # Check if it's available + xxd --version + ``` + +- Clone the repository + + ``` + git clone https://github.com/webui-dev/webui.git + ``` + +- Build the library + + **Linux** + ```sh + make + # The default compiler for linux is GCC. + # Use `make COMPILER=clang` to compile with Clang. + ``` + + **macOS** + ```sh + make + ``` + + **Windows** + ```sh + # Compile with MSVC + nmake + # Alternatively use MinGW to compile with GCC + mingw32-make + # Use `mingw32-make COMPILER=TCC` to comiple with TCC. + ``` + + When building has completed, the library files can be found in `build/`. + +- **Building as WebUI Contributor** + + You can add the `debug` target to the build commands to compile the debug build of the library. E.g., + + ```sh + make debug + ``` + + To only rebuild the `webui.js` client use the build script in `src/client/` + + ```sh + # Linux/macOS + src/client/build.sh + # Windows PowerShell + src/client/build.ps1 + ``` + + ## Examples - - [C](https://github.com/webui-dev/webui/tree/main/examples/C) - - [C++](https://github.com/webui-dev/webui/tree/main/examples/C++) +- [C](https://github.com/webui-dev/webui/tree/main/examples/C) +- [C++](https://github.com/webui-dev/webui/tree/main/examples/C++) ## Wrappers - - [Python](https://github.com/webui-dev/python-webui) - - [TypeScript / JavaScript](https://github.com/webui-dev/deno-webui) - - [Go](https://github.com/webui-dev/go-webui) - - [Rust](https://github.com/webui-dev/rust-webui) (*Not Complete*) - - [V](https://github.com/webui-dev/v-webui) - - [Nim](https://github.com/webui-dev/nim-webui) - - [Zig](https://github.com/webui-dev/zig-webui) (*Not Complete*) +- [Python](https://github.com/webui-dev/python-webui) +- [TypeScript / JavaScript](https://github.com/webui-dev/deno-webui) +- [Go](https://github.com/webui-dev/go-webui) +- [Rust](https://github.com/webui-dev/rust-webui) (*Not Complete*) +- [V](https://github.com/webui-dev/v-webui) +- [Nim](https://github.com/webui-dev/nim-webui) +- [Zig](https://github.com/webui-dev/zig-webui) (*Not Complete*) ## Supported Web Browsers