mirror of
https://github.com/Not-Nik/raylib-zig.git
synced 2025-09-09 12:07:27 +00:00
Update README.md
This commit is contained in:
parent
674e5ada11
commit
d56fc7b663
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user