#zemscripten add emsdk to build.zig.zon

1 messages · Page 1 of 1 (latest)

deep quarry
#

According to zemscripten's (https://github.com/zig-gamedev/zemscripten) README, I can add the emsdk to my build.zig.zon with ```
zig fetch --save https://github.com/emscripten-core/emsdk/archive/refs/tags/4.0.3.tar.gz


Is there a way to have my build system for my zig project to pull down emsdk toolchain automatically like this?
GitHub

Build package and shims for Emscripten emsdk. Contribute to zig-gamedev/zemscripten development by creating an account on GitHub.

deep quarry
#

I'm using raylib-zig so I think I dont actually need zemscripten, but it would be nice to not have to go through the hassle of manually install emsdk

#

is there a way to vendor emsdk somehow?

pastel valve
#

@deep quarry you need --save={name}

e.g. zig fetch --save=emsdk git+https://github.com/emscripten-core/emsdk.git#4.0.3

More here: https://ziggit.dev/t/does-zig-zon-not-support-non-zig-based-projects/6125

GitHub

Emscripten SDK. Contribute to emscripten-core/emsdk development by creating an account on GitHub.

deep quarry
#

Ah! let me give that a try

#

that worked! ty, but another issue that I have is what do I provide for --sysroot when using this fetched emsdk?

deep quarry
#

for context, im trying to integrate this with raylib-zig

pale trout