NUGET Package

Dec 29, 2013 at 7:23 PM
Hey guys! Nice work with the December release! I think there is great value in the DirectXTK API -- and it helps with the transition from XNA to C++. I have two questions for the team --

1) I notice the generated library in release mode is 16MB -- this seems large to me with regard to app download sizes in the Windows Store. Are there any long term plans to decrease the size (i.e. by creating different libraries targeted to features -- audio, 3d, etc)? I am curious to know what factors might contribute to this size if DirectXTK is a wrapper. I might be showing my ignorance here with respect to C++.

2) Will we see the December release added to NuGet? The last version published is March 2013.

Dec 30, 2013 at 1:08 AM
Edited Dec 30, 2013 at 1:09 AM
Regarding the first question, it looks like compiling to a DLL instead of static lib reduces the size of DirectXTK from 16MB to 133KB. Is there any reason not to do this for a Windows 8 Store App?

Dec 30, 2013 at 6:49 AM
Edited Dec 30, 2013 at 6:50 AM
The primary reason for making DirectXTK a static library is simplicity. It avoids any complexities with adding DLLs, deployment, etc. The vast majority of the static .lib is replicated inline code primarily coming from DirectXMath. When linked, it will typically yield only a few hundred K of final Release code.

So if DLLs work for you, then that's great. The static lib should contribute a similar smallish size to an EXE as well.

I'm working on refreshing NuGet, but I don't have an ETA as of yet...
Marked as answer by walbourn on 12/29/2013 at 10:49 PM
Dec 30, 2013 at 7:29 PM
The main point about file sizes is that you don't actually ship the static .lib file, so it is not particularly meaningful to care about how big that binary is. What matters is the size of the files you do ship, so you need to be looking at the size of your final .exe vs. shipping this code as a separate .dll.
Dec 30, 2013 at 10:29 PM
Hi Shawn, Chuck!

Thanks guys. I admit my complete ignorance here in the VC++ world. Thank you for your helpful and candid replies. I finished getting SwapChainPanel working in my game using DirectXTK and it works terrific! Now to test it on my Surface 2...