Skip to content

Instantly share code, notes, and snippets.

@lambdageek
Last active November 15, 2021 18:07
Show Gist options
  • Save lambdageek/0086a1e3a0203d9101aedd7b7aa52b0f to your computer and use it in GitHub Desktop.
Save lambdageek/0086a1e3a0203d9101aedd7b7aa52b0f to your computer and use it in GitHub Desktop.
Environment for .NET 6 bundled Emscripten
#! /bin/sh
# Source this with `. dotnet-emscripten-env.sh` to set up the paths to use `emcc` from the version of Emscripten bundled with .NET 6
dotnet_packs_dir=/usr/local/share/dotnet/packs
dotnet_emscripten_prefix=Microsoft.NET.Runtime.Emscripten.2.0.23
dotnet_rid=osx-x64
dotnet_ver=6.0.0
# set variables read by tools/emscripten/.emscripten
export DOTNET_EMSCRIPTEN_LLVM_ROOT=${dotnet_packs_dir}/${dotnet_emscripten_prefix}.Sdk.${dotnet_rid}/${dotnet_ver}/tools/bin
export DOTNET_EMSCRIPTEN_NODE_JS=${dotnet_packs_dir}/${dotnet_emscripten_prefix}.Node.${dotnet_rid}/${dotnet_ver}/tools/bin/node
export DOTNET_EMSCRIPTEN_BINARYEN_ROOT=${dotnet_packs_dir}/${dotnet_emscripten_prefix}.Sdk.${dotnet_rid}/${dotnet_ver}/tools
export PATH="${dotnet_packs_dir}/${dotnet_emscripten_prefix}.Sdk.${dotnet_rid}/${dotnet_ver}/tools/emscripten:${PATH}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment