The svc-assets
micro-service provides a comprehensive asset management
solution for operators. It enables clients to perform various actions
such as registering, updating, and grouping assets. Additionally, it
facilitates the delegation of grouped assets from one operator to
another. This service is accessible to existing systems through a REST
API interface.
Directory:
server/src/
: Source Code and Unit Tests of the serverclient-grpc/src/
: Autogenerated gRPC Client Source Code and examplesproto/
: Types used for gRPC messagingtests/
: Integration Testsdocs/
: Module Documentation
Install Rust with Rustup.
# Adds custom pre-commit hooks to .git through cargo-husky dependency
# !! Required for developers !!
cargo test
To ensure consistent build and test outputs, Arrow provides a Docker image with all required software installed to build and test Rust projects. Using the Makefile, you can easily test and build your code.
# Build Locally
make rust-build
# Create Deployment Container
make build
# Run Deployment Container
make docker-run
# Stopping Deployment Container
make docker-stop
# Running examples (uses docker compose file)
make rust-example-grpc
The Arrow docker image has some formatting tools installed which can fix your code formatting for you. Using the Makefile, you can easily run the formatters on your code. Make sure to commit your code before running these commands, as they might not always result in a desired outcome.
# Format TOML files
make toml-tidy
# Format Rust files
make rust-tidy
# Format Python files
make python-tidy
# Format all at once
make tidy
Before being able to commit, cspell will be used as a spelling checker for all files, making sure no unintended spelling errors are found. You can run cspell yourself by using the following make target:
make cspell-test
If all spelling errors are fixed, but cspell still finds words that are unknown, you can add these words to the local project words list by running the following command:
make cspell-add-words
There are additional make targets available. You can find all possible targets by running make without a target or use make help
The following documents are relevant to this service:
Learn more about us:
Please note that svc-assets is under BUSL license until the Change Date, currently the earlier of two years from the release date. Exceptions to the license may be specified by Arrow Governance via Additional Use Grants, which can, for example, allow svc-assets to be deployed for certain production uses. Please reach out to Arrow DAO to request a DAO vote for exceptions to the license, or to move up the Change Date.
If you are building a non-end product like a library, include Cargo.lock
in .gitignore
.
If you are building an end product like a command line tool, check Cargo.lock
to the git.
Read more about it here;