I am a bit confused about the difference between nake and nimble when it applies to project management.
Coming from Rust, where I am used to use Cargo to manage my projects/builds.
I am currently using 'nimble init' to kick off a new Nim project, but I am aware of nake, which is a build tool.
Should I use nake instead of nimble? Or both?
I mean, if nimble can be used, what is the point of nake?
What are you using? :)
The reason I am confused is because if nimble is able to handle builds (nimble build) I would rather not have to deal with nake, if I can help it. :)
Nake is probably more fully featured, but my needs are simple.
Since I am totally new to Nim, I thought I'd ask you guys for advice.
Are you using Nake, why / why not ?
my needs are simple
Consider first in Nim running just nim c your_program will compile not only your_program.nim, but also all imported modules recursively and build the final complete executable, so most of time you need just the compiler to build your project.
will compile not only your_program.nim, but also all imported modules recursively and build the final complete executable, so most of time you need just the compiler to build your project.
That is true, and also how I started out - mainly due to the fact that the Nim tutorial does not mention nimble or nake - but isn't this just what happens behind the scenes when I invoke nimble build ?
Looking at some Nim packages at Github, I notice that a lot of those uses nimble for packaging and nake for building, but not all of them.
But, yes: I will probably just ignore nake for the time being.
I was just wondering what the best practices were.
Notice that nimble now supports tasks, which are custom command, scriptable with nimscript. This should be extensible enough to cover your needs.
Nake is a build tool - I have never used it, since I find that build tools need to be coupled to a package manager to be useful - there is no way to build anything non trivial without making use of dependencies, and then your build tool must be in some way aware of what dependencies are available and where. This is why I think that coupling package managers and build tools makes sense, but I know people whose opinions differ
Thanks, Andrea, for confirming my thinking.
To me, it makes a lot of sense to let a package manager handle builds, versions and dependencies, and it looks like that Nimble is slowly obsoleting Nake by incorporating most (all?) of Nake's features. At the very least it can explain the overlap between the two - and my confusion. :)
and it looks like that Nimble is slowly obsoleting Nake by incorporating most (all?) of Nake's features
That is precisely what's happening :)
You should be able to use Nimble for most use cases nowadays.
That is precisely what's happening :)
Excellent!
I'll carry on with Nimble, then ;)