Update README.md

This commit is contained in:
Not-Nik 2024-05-31 20:39:40 +02:00
parent 674e5ada11
commit d56fc7b663
No known key found for this signature in database
GPG Key ID: E95F679E3CDD9784

View File

@ -85,6 +85,7 @@ const raylib_dep = b.dependency("raylib-zig", .{
const raylib = raylib_dep.module("raylib"); // main raylib module
const raylib_math = raylib_dep.module("raylib-math"); // raymath module
const rlgl = raylib_dep.module("rlgl"); // rlgl module
const raygui = raylib_dep.module("raygui"); // raygui module
const raylib_artifact = raylib_dep.artifact("raylib"); // raylib C library
```
@ -93,11 +94,11 @@ Now add the modules and artifact to your target as you would normally:
```zig
exe.linkLibrary(raylib_artifact);
exe.root_module.addImport("raylib", raylib);
exe.root_module.addImport("raylib-math", raylib_math);
exe.root_module.addImport("raymath", raylib_math);
exe.root_module.addImport("rlgl", rlgl);
```
If you additionally want to support Web as a platform with emscripten, you will need `emcc.zig`. Refer to raylib-zig's project template on how to use it
If you additionally want to support Web as a platform with emscripten, you will need to use `emcc.zig` by importing raylib-zig's build script with `const rlz = @import("raylib-zig");` and then accessing its functions with `rlz.emcc`. Refer to raylib-zig's project template on how to use them.
## Exporting for web
To export your project for the web, first install emsdk.