How can I build multiple binaries with Cargo?

后端 未结 3 705
离开以前
离开以前 2020-12-04 08:36

I\'d like to make a project with a daemon and a client, connecting through a unix socket.

A client and a daemon

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-04 09:26

    Another format could be to replicate what the Crates.io source code has done, if you have a massive project, something like:

    Main Library in src, with a Bin folder with your executables. Then make calls to your main library crate from your executables.

    That way you library is centralized so easier to find things as it's cached.

提交回复
热议问题