Skip to main content

No project description provided

Project description

Fast Unit - Rust Unit Management for Python

Originally created as a faster version of Unum for use in Python-based FRC robot code.

Building and Installing for Local Machine

maturin build --release  # This will generate wheels and put a native library in ./fast_unit/
pip install .  # Installs to your python interpreter

Cross Compilation for RoboRIO (WIP)

Getting Required Files

In order to compile for RoboRIO, you need to copy the contents of /usr/local/lib and update the RIO_ROOT to reflect where you copied them. This is assuming you have already installed python on your RIO using RobotPy.

This is the command I used to accomplish this:

scp lvuser@roboRIO-XXXX-FRC.local:/usr/local/lib ./RIO_ROOT/usr/local/lib

Installing ARM Linker

Rust needs an arm linker to compile arm binaries, which can be installed fairly easily. On debian, run the following:

sudo apt install gcc-arm-linux-gnueabi

Building

Once you have the required tools, running the script below should compile and build the wheels.

# Add RIO's target triple
rustup target add arm-unknown-linux-gnueabi

# Set cross-compilation environment variables
export PYO3_CROSS_PYTHON_VERSION=3.10
export PYO3_CROSS_LIB_DIR="RIO_ROOT/usr/local/lib"

# Build wheels for RIO
maturin build --target=arm-unknown-linux-gnueabi --rustc-extra-args="-C linker=arm-linux-gnueabi-gcc"

Project details


Download files

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

Source Distribution

fast_unit-0.5.1.tar.gz (55.6 MB view hashes)

Uploaded Source

Built Distributions

fast_unit-0.5.1-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl (228.8 kB view hashes)

Uploaded PyPy manylinux: glibc 2.24+ x86-64

fast_unit-0.5.1-cp310-cp310-manylinux_2_24_x86_64.whl (227.9 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.24+ x86-64

fast_unit-0.5.1-cp310-cp310-manylinux_2_24_armv7l.whl (223.3 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.24+ ARMv7l

fast_unit-0.5.1-cp310-cp310-linux_armv7l.whl (223.3 kB view hashes)

Uploaded CPython 3.10

fast_unit-0.5.1-cp39-cp39-manylinux_2_24_x86_64.whl (227.9 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.24+ x86-64

fast_unit-0.5.1-cp38-cp38-manylinux_2_24_x86_64.whl (227.8 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.24+ x86-64

fast_unit-0.5.1-cp37-cp37m-manylinux_2_24_x86_64.whl (227.7 kB view hashes)

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

fast_unit-0.5.1-cp36-cp36m-manylinux_2_24_x86_64.whl (225.2 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.24+ 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