Skip to content

Commit

Permalink
docs: update build section in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Aug 17, 2023
1 parent 9b28a35 commit 0e9f79d
Showing 1 changed file with 74 additions and 15 deletions.
89 changes: 74 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
**macOS**
```sh
make
```
**Linux**
```sh
make
# The default compiler for linux is GCC.
# Use `make COMPILER=clang` to compile with Clang.
```
**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
Expand Down

0 comments on commit 0e9f79d

Please sign in to comment.