Skip to content

Experimental Rust wrappers and example code for APIs and features in AXIS Camera Application Platform (ACAP)

License

Notifications You must be signed in to change notification settings

AxisCommunications/acap-rs

Repository files navigation

ACAP for Rust

Easy and safe ACAP apps using Rust

Important

This project is an experiment provided "as is". While we strive to maintain it, there's no guarantee of ongoing support, and it may become unmaintained in the future. Your contributions are appreciated, and feel free to fork and continue the journey if needed.

This repo is home to a mixture of developer tools, example apps, and library crates. To simply get started with a new app, please see acap-rs-app-template.

Quickstart guide

The quickest way to build the hello_world example is to launch the dev container and run make build AXIS_PACKAGE=hello_world. Once it completes there should be two .eap files in target/acap:

$ ls -1 target/acap
hello_world_1_0_0_aarch64.eap

If you prefer to not use dev containers, or the implementation in your favorite IDE is buggy, the app can be built using only docker:

docker build --file .devcontainer/Dockerfile --tag acap-rs .
docker run \
  --interactive \
  --rm \
  --tty \
  --user $(id -u):$(id -g) \
  --volume $(pwd):$(pwd) \
  --workdir $(pwd) \
  acap-rs \
  make build AXIS_PACKAGE=hello_world

This works with any of the example applications.

Important workflows are documented in the Makefile and can now be listed with make help.

Advanced setup

Development environments outside containers are more difficult to reproduce and maintain. Should it nonetheless be of interest, one procedure is documented in this workflow.

Example applications

Below is the list of examples available in the repository.

Library crates

Name Documentation
acap-logging on docs.rs
acap-vapix in source
licensekey in source
licensekey-sys
mdb
mdb-sys

Troubleshooting

The docker image may fail to build with the following included in the output: /usr/bin/env: 'sh\r': No such file or directory This is likely caused by git replacing POSIX newlines with Windows newlines in which case it can be resolved by either

  • cloning the code in Windows Subsystem for Linux (WSL), or
  • reconfiguring git.

License

MIT

About

Experimental Rust wrappers and example code for APIs and features in AXIS Camera Application Platform (ACAP)

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •