Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/permutationlock/zig_hello_emcc
A hello world example that can build to target native targets and Emscripten
https://github.com/permutationlock/zig_hello_emcc
Last synced: 2 days ago
JSON representation
A hello world example that can build to target native targets and Emscripten
- Host: GitHub
- URL: https://github.com/permutationlock/zig_hello_emcc
- Owner: permutationlock
- License: mit
- Created: 2023-11-15T08:44:08.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-13T22:16:21.000Z (8 months ago)
- Last Synced: 2024-03-13T23:29:37.390Z (8 months ago)
- Language: Zig
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.MIT
Awesome Lists containing this project
README
# Zig "Hello, emcc!"
A hello world example that will compile to emscripten targets.
Requires that `emcc` is in your path.To build for native targets and run:
```Shell
> zig build
> ./zig-out/bin/hello_emcc
Hello, emcc!
```To build for emscripten and host the application:
```Shell
zig build -Dtarget=wasm32-emscripten
go run server.go
```Then go to [http://127.0.0.1:8083](http://127.0.0.1:8083) in a browser to
see the output.