Questions about using workspaces

So I'm just getting into using workspaces and wanted to make sure I understood a few things. As an example, let's say I'm making a single networking project that will have a client binary, server binary, and a library for a shared resource between the two.

Project
    ->client
    ->server
    ->lib

If I build this project for Windows, will the lib be output as it's own file? Like a DLL or something? Or would I be able to take the single server binary and run it without any other files and have it work as a portable binary?

A more specific question here. I've used the winresource crate in the past to give my windows binaries more information and a program icon. How do I do that in the context of a workspace? Do I just have each binary in the project (client and server) implement the winresource crate individually? Or does that somehow get moved up to the workspace level?

Now that I think about it...it's probably the former. But I'll leave the question in for confirmation from the community.

The default for Rust is static linking, you'd have to explicitly configure the library crate to get a DLL out of it.

Yes, you will need to pack resources for each binary individually.

1 Like