This project has moved. For the latest updates, please go here.

How does ClearScript choose which dlls to use? (x32 or x64)

May 2, 2015 at 12:58 PM
I'm using ClearScript with the V8 engine and I'm noticing that it's always using the x32 dlls ClearScriptV8-32.dll and v8-ia32.dll. These also require the VC++ redistributable package for x86 machines. ClearScriptV8-64.dll and v8-x64.dll don't seem to be touched, and I'm not sure if these would require the x64 VC++ redistributable instead.

Can I rely on (or configure) this behaviour and not bundle the x64 dlls or the x64 VC++ redistributable to lower the size of my distributed software?
Coordinator
May 3, 2015 at 11:23 AM
Hi Eniko,

ClearScript's main assembly (ClearScript.dll) is AnyCPU and can therefore be loaded into any kind of process. However, because V8 and ClearScript's V8 interface contain native code, they require separate 32- and 64-bit versions. When instructed to create a V8 script engine or runtime instance, ClearScript checks Environment.Is64BitProcess and loads the appropriate assemblies.

If your application targets only the 32-bit platform, or consists of libraries that can only be loaded into a 32-bit process, then there's no need to distribute ClearScript's 64-bit assemblies.

Cheers!
May 3, 2015 at 11:30 AM
Edited May 3, 2015 at 2:45 PM
Looks like my Any CPU main process was set to prefer 32 bit, that's why it was loading the 32 bit version. Thanks for clearing that up for me!