Comments (5)
This is a good idea. Let's move forward with it.
The current default is to produce a -bin
package after compiling everything, so we'd either have to:
- Add a new flag to do what you're suggesting
- Change the default behaviour to do what you're suggesting, and have the
-bin
behaviour behind a flag (a breaking change). - Completely overhaul the CLI to give no preference to one style or the other (e.g.
cargo aur bin
,cargo aur ?
) (also a breaking change)
from cargo-aur.
I see what you mean about the commands. I see no need to change the existing defaults from what you've set, am happy for this to be a new flag. In terms of an overhall, this could also be a good opportunity to upgrade to clap
from gumdrop
. Guessing this is possible without a breaking change to the flags.
from cargo-aur.
Now then: what should the new flag be callled? Off the top of my head:
--plain
--source
--from-crate
--no-bin
from cargo-aur.
Took some time to think about this. Combining the two suggestions of --source and --no-bin, we could do;
New flag --source [SourceType]
where [SourceType]
is project
or crates-io
. (Default: project = current behaviour)
- This flag would determine where the source code is sourced from.
New flag --no-bin
. (Default: false = current behaviour)
- This flag prevents binary build and creates a PKGBUILD that builds from a tarball.
This would allow two new combination --source crates-io
which would pull the crates.io version and build it into a binary, --source project --no-bin
which would publish based off a github/gitlab tarball. This would also allow for different --source
options in future e.g url
if we are hosting somewhere other than github/gitlab.
I also wanted to note that to calculate the checksums for the crates.io build, we'll need to actually download the crate. Do you have a preference on how this is implemented, we could use curl, makepkg itself but it's a bit awkward since it needs a pkgbuild first, or a rust library like libcurl or reqwest.
from cargo-aur.
These are good suggestions. Let's move forward with both of them.
I also wanted to note that to calculate the checksums for the crates.io build, we'll need to actually download the crate. Do you have a preference on how this is implemented
Let's be a good Unix tool and just call curl
(or wget
) via Rust's Command
type. That will minimize Rust dependencies within cargo-aur
itself.
from cargo-aur.
Related Issues (12)
- Support for gitlab release URLs HOT 3
- Add support for post installation script HOT 16
- Add support for differing binary names HOT 3
- Output to target/ HOT 6
- Use SPDX license identifier HOT 2
- support rust workspace HOT 5
- Installing data into /usr/local/share HOT 13
- Make "homepage" optional in Cargo.toml HOT 1
- unexpected free argument `aur` HOT 4
- Fails for singular author HOT 2
- Binaries are stripped by default HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cargo-aur.