helsing-ai / buffrs

Modern protobuf package management
https://crates.io/crates/buffrs
Apache License 2.0
214 stars 12 forks source link

Have `buffrs init dir` use dir instead of the current working directory #185

Closed qsantos closed 4 months ago

qsantos commented 11 months ago

I was a bit surprised when buffrs init --lib units created Proto.ml and proto/ in the current working directory instead of creating a units/ directory, like Cargo would do.

The second blog post actually uses buffrs init --lib units and suggests it works (or worked) like Cargo.

The current behavior is a bit annoying, since it mean you need to mkdir and cd into the directory before running init. If that's okay, I would like for buffrs init to work as closely as cargo init as possible, even initializing a git repository if there is none. It might not be very useful for implementations, but libraries could definitely use that.

mara-schulke commented 11 months ago

The behavior is inspired by cargo init / cargo new – we have only implemented init so far

mara-schulke commented 9 months ago

Maybe we can implement buffrs new?

vsiles commented 8 months ago

Just to clarify the possible behaviors as we might want to distinguish package names from directory names. Right now:

First option is to go the new / lib way:

Now I read that the package section of Proto.toml files might go away. Would we keep the name around in that case, or use the directory name instead ?