Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bltavares/cargo-crate-type
Utility to modify Cargo.toml and define the crate type
https://github.com/bltavares/cargo-crate-type
Last synced: 28 days ago
JSON representation
Utility to modify Cargo.toml and define the crate type
- Host: GitHub
- URL: https://github.com/bltavares/cargo-crate-type
- Owner: bltavares
- License: apache-2.0
- Created: 2018-11-15T23:07:17.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-17T21:48:21.000Z (almost 6 years ago)
- Last Synced: 2024-10-12T22:27:52.254Z (about 1 month ago)
- Language: Rust
- Size: 11.7 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# cargo crate-type
Edits the lib crate type to help building cross-platform libs, by modifying Cargo.toml
---
This command `cargo` subcommand is exclusively intended to be used to help with [working arround](https://github.com/rust-lang/rust/issues/51009) how crate types are defined, in order to help with cross-platform builds.
It is currently [not possible](https://github.com/rust-lang/cargo/issues/6160) to define a single `crate-type` override on `cargo build`, which causes libs intended to be used on other languages to compile more than one type of crate.
With this command, the `Cargo.toml` will be rewriten top include only the specific needed crate type, either it being dynamic or static.
```
cargo install cargo-crate-typecargo crate-type [dynamic|static]
```**Beware:** This command will alter your `Cargo.toml`
Intended to be used on [crossgen](https://github.com/yoshuawuyts/crossgen)
## License
Licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
additional terms or conditions.