Skip to content

Commit

Permalink
Wasm support (#11)
Browse files Browse the repository at this point in the history
* Testing custom D runtime for Wasm targets. (experimental) - Recommendation use `betterC` on wasm target!
* This custom D runtime for Wasm targets was started by Adam D. Ruppe, in arsd-webassembly.
* Some of the features are not yet implemented.
* This runtime may become version locked as the D runtime hooks keeps changing.
* This runtime is not yet fully tested.
  • Loading branch information
kassane authored Jan 21, 2024
1 parent 13a33b6 commit c22befd
Show file tree
Hide file tree
Showing 12 changed files with 360 additions and 132 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ jobs:
sudo apt-get update
sudo apt-get install libglu1-mesa-dev mesa-common-dev xorg-dev libasound-dev
- name: Build Summary
run: zig build -DzigCC --summary all

- name: Running Test
if: runner.os != 'Windows'
run: zig build test -DzigCC
- name: Build Native
run: zig build -DzigCC --summary all
- name: Build Wasm
run: zig build -DzigCC --summary all -Dtarget=wasm32-emscripten
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Auto-generated [D](https://dlang.org) bindings for the [sokol headers](https://g
**Required**

- [zig](https://ziglang.org/download) v0.12.0 or master
- [ldc](https://ldc-developers.github.io) v1.35.0 or latest-CI (nightly)
- [ldc](https://ldc-developers.github.io) v1.36.0 or latest-CI (nightly)

Supported platforms are: Windows, macOS, Linux (with X11)

Expand All @@ -27,11 +27,11 @@ zig build -Doptimize=ReleaseFast -Dshared
zig build run-blend -Doptimize=ReleaseFast
zig build run-clear -Doptimize=ReleaseFast
zig build run-cube -Doptimize=ReleaseFast
zig build run-debugtext-print -Doptimize=ReleaseFast
zig build run-debugtext_print -Doptimize=ReleaseFast
zig build run-mrt -Doptimize=ReleaseFast
zig build run-saudio -Doptimize=ReleaseFast
zig build run-sgl-context -Doptimize=ReleaseFast
zig build run-user-data -Doptimize=ReleaseFast
zig build run-sgl_context -Doptimize=ReleaseFast
zig build run-user_data -Doptimize=ReleaseFast
zig build run-triangle -Doptimize=ReleaseFast

zig build --help
Expand All @@ -50,8 +50,8 @@ zig build --help
# ReleaseFast
# ReleaseSmall
# -Dshared=[bool] Build sokol dynamic library (default: static)
# -DbetterC=[bool] Omit generating some runtime information and helper functions. (default: false)
# -DzigCC=[bool] Use zig cc as compiler and linker. (default: false)
# -DbetterC=[bool] Omit generating some runtime information and helper functions (default: false)
# -DzigCC=[bool] Use zig cc as compiler and linker (default: false)
```

## Shaders
Expand Down
Loading

0 comments on commit c22befd

Please sign in to comment.