Skip to main content

Rust backend for NaluDAQ

Project description

NaluDAQ_rs

Rust backend for NaluDaq.

Setup

Make sure the Rust toolchain is installed.

Clone the repository to a suitable location:

$ git clone http://gitlab.naluscientific.com/nalusoft/prototypes/naludaq_rs.git

Done!

Building the backend for python

pip install maturin
maturin build

Building the Backend

The backend is easy to build:

$ cd naludaq_rs
$ cargo build --release

Developers may ommit the --release flag for unoptimized builds.

Building for RPI4

Building using docker:

docker build . -t cc/rpi4

to make the container, the build the app with:

docker run --rm -v ${pwd}:/app cc/rpi4

Running the Backend

To run the backend, run the following command:

$ cargo run  --release -- [<ROOT>] [--addr <ADDR>] [-d | --debug]  [--api]

Where the arguments are as follows:

  • <ROOT> is the root directory to run the server in. By default, it is the current working directory of the terminal it was run from.
  • --addr <ADDR> is the address to bind the server to in the format IP:PORT. If unspecified, the server is bound to an open port on the loopback address.
  • -d | --debug shows additional debug messages.
  • --api will open the Swagger UI in the system browser.

Documentation

The documentation can be built using the following command:

$ cargo doc --document-private-items --no-deps

The API

NaluDAQ_rs is controlled through its REST API over HTTP. This allows it to be controlled from any machine connected to a network.

The backend can be controlled on the fly via Swagger. Use the --api flag when starting the backend to display the Swagger UI.

Alternatively, the (non-interactive) Swagger UI may be viewed without the backend by running the following command:

$ cargo run --bin api -- [--output OUTPUT_FILE]

If the --output argument is provided, the OpenAPI JSON data describing the API is written to the file and the program will immediately exit.

Developers

Profiling

Use the build profile called `release-with-debug for building release mode with debug symbols.

$ cargo build --profile release-with-debug

On Windows machines with Intel processors you can use Intel VTune to profile the backend.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

naludaq_rs-0.1.8-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.1 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

naludaq_rs-0.1.8-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.1 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

naludaq_rs-0.1.8-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.1 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

naludaq_rs-0.1.8-cp311-none-win_amd64.whl (5.9 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

naludaq_rs-0.1.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.1 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

naludaq_rs-0.1.8-cp310-none-win_amd64.whl (5.9 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

naludaq_rs-0.1.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.1 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

naludaq_rs-0.1.8-cp39-none-win_amd64.whl (5.9 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

naludaq_rs-0.1.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.1 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

naludaq_rs-0.1.8-cp38-none-win_amd64.whl (5.9 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

naludaq_rs-0.1.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.1 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

naludaq_rs-0.1.8-cp37-none-win_amd64.whl (5.9 MB view hashes)

Uploaded CPython 3.7 Windows x86-64

naludaq_rs-0.1.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.1 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page