🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

arcade-accelerate

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arcade-accelerate

A companion library for Arcade providing accelerated Rust functions

1.0.2
100

Supply Chain Security

100

Vulnerability

100

Quality

100

Maintenance

100

License

Maintainers
2

arcade-accelerate

An experimental library for accelerating Arcade using Rust. The module can be imported and monkey patch Arcade, replacing functions and types with rust versions.

import arcade_accelerate
arcade_accelerate.bootstrap()

import arcade

It is important to run the arcade-accelerate bootstrapping process before importing Arcade, otherwise the monkey-patched versions will not be fully applied.

Build / Setup

First create and activate a Python virtual environment, then install maturin:

pip install maturin

Install the crate as module in the current virtual environment using Maturin. Generally when working on performance enhancements you will want to use the --release flag.

# Debug
maturin develop

# Release
maturin develop --release

Then you can install Arcade into the same virtual environment and run any of it's examples:

cd <directory of arcade project>
pip install -e .

Optimally testing should be done against the development branch of Arcade. In order to enable arcade-accelerate add these two lines anytime before importing arcade. It is important that the bootstrap is done prior to importing Arcade, otherwise the monkey-patched functions/classes will not fully apply.

import arcade_accelerate
arcade_accelerate.bootstrap()

import arcade

If you would like to run Arcade's test suite with arcade-accelerate enabled, you can do so by setting the ARCADE_PYTEST_USE_RUST environment variable before running pytest on Arcade. You just need to ensure that both Arcade and arcade-accelerate are installed in the same environment.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts