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.
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
.
Development environments outside containers are more difficult to reproduce and maintain. Should it nonetheless be of interest, one procedure is documented in this workflow.
Below is the list of examples available in the repository.
consume_analytics_metadata
: An example that consumes metadata.embedded_web_page
: An example that illustrates how to bundle an embedded web page.hello_world
: A simple "Hello, World!" application.licensekey_handler
: An example that illustrates how to check the licensekey status.reverse_proxy
: Uses a web server and reverse proxy configuration to expose HTTP and WebSocket APIs.using_a_build_script
: Uses a build script to generate html, lib and app manifest files at build time.vapix_access
: Uses a VAPIX service account to access VAPIX APIs.
Name | Documentation |
---|---|
acap-logging | on docs.rs |
acap-vapix | in source |
licensekey | in source |
licensekey-sys | |
mdb | |
mdb-sys |
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
.