$ cargo-acap-build -h
Build app using cargo
Usage: cargo-acap-build [OPTIONS] [ARGS]...
Arguments:
[ARGS]... Pass additional arguments to `cargo build`
Options:
--target <TARGET> If given, build only for the given architecture(s) [possible values: aarch64, armv7hf]
-h, --help Print help (see more with '--help')
-V, --version Print version
A simple project will look something like:
<PACKAGE_ROOT>/
: Directory in which the package manifest is located1.Cargo.toml
: Package manifest2 describing the binary crate that will be included in the app.src/
main.rs
: Conventional location for the executable3.
LICENSE
: Open source acknowledgements4. If absent, it will be generated usingcargo-about
.manifest.json
Application manifest defining the app and its configuration5. If absent, the resulting artifact will be a plain executable instead of an EAP.html/
: Optional web client pages to include in the app67.lib/
: Optional dynamically linked libraries to include in the app67.additional-files/
: Optional additional files to include in the app7.
Some files and directories may be generated by a build script8 and placed in <OUT_DIR>/
9 instead of in <PACKAGE_ROOT>/
:
LICENSE
manifest.json
html/
lib/
additional-files/
In addition to the above structure this tool makes the following assumptions:
- The package name (
package.name
inCargo.toml
) matches the app name (acapPackageConf.setup.appName
inmanifest.json
). - The package version (
package.version
inCargo.toml
) matches the app version (acapPackageConf.setup.version
inmanifest.json
).
Footnotes
-
Defined in https://doc.rust-lang.org/cargo/appendix/glossary.html#package ↩
-
Documented in https://doc.rust-lang.org/cargo/reference/manifest.html ↩
-
A conventional Rust package layout is described in https://doc.rust-lang.org/cargo/guide/project-layout.html ↩
-
Documented in https://axiscommunications.github.io/acap-documentation/docs/develop/application-project-structure.html#license-file ↩
-
Documented in https://axiscommunications.github.io/acap-documentation/docs/develop/application-project-structure.html#manifest-file ↩
-
Mentioned in https://axiscommunications.github.io/acap-documentation/docs/develop/application-project-structure.html ↩ ↩2
-
Mentioned in https://axiscommunications.github.io/acap-documentation/docs/develop/build-install-run.html#build-tool ↩ ↩2 ↩3
-
Documented in https://doc.rust-lang.org/cargo/reference/build-scripts.html ↩
-
One of many variables set for build scripts: https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts ↩