Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkauzh authored Oct 2, 2023
1 parent bdad759 commit b7b2787
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Webzen - A Go UI Framework for WebAssembly

![GitHub last commit](https://img.shields.io/github/last-commit/dimkauzh/webzen)
![GitHub license](https://img.shields.io/github/license/dimkauzh/webzen)

Webzen is a Go UI Framework that targets WebAssembly, enabling you to build web applications with Go. It helps you build ui's in the web easy and fast. This project leverages `syscall/js` to interact with the JavaScript runtime in the browser.

> **Please note that Webzen is currently under high maintenance and is not production-ready.** The project is actively being developed and improved, which is why there is only a `dev` branch available.
## Building
### How to Run the Example

To run the example provided in this repository, follow these steps:

1. Clone this repository to your local machine:

```shell
git clone https://github.com/dimkauzh/webzen.git
```
2. Navigate to the project folder:

```shell
cd webzen
```
3. Build and run the example using make and wasmserve. This will start a local development server at localhost:8080:
```shell
make example
```
Open your web browser and go to http://localhost:8080 to see the example in action.

### Building a Ready Application
To build a production-ready WebAssembly application with Webzen, follow these steps:

Compile your Go code to WebAssembly using the GOOS=js and GOARCH=wasm flags. Replace build_path/file_name.wasm and file_path/file_name.go with your desired output file path and source file, respectively:

```shell
GOOS=js GOARCH=wasm go build -o build_path/file_name.wasm file_path/file_name.go
```
You can then include the generated .wasm file in your web application and load it using JavaScript.

Feel free to explore the example provided in this repository to better understand how Webzen works and how you can create your own Go-powered web applications.

## License
This project is licensed under the GPLv3 License - see the LICENSE file for details.

0 comments on commit b7b2787

Please sign in to comment.