Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial commit for Rust powered modules #56

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Initial commit for Rust powered modules #56

wants to merge 1 commit into from

Conversation

Schamper
Copy link
Member

@Schamper Schamper commented Oct 28, 2024

Experimental branch for playing around with Rust powered modules. With this POC I initially set out to replace the dependencies on the lz4 and python-lzo Python dependencies, and replacing them with a Rust powered extension.

The concept here is that we will use maturin to build wheels that contain the Rust compiled extension, but we will not change the build system in pyproject.toml. This is to ensure that we will never compile when installing a "source wheel". Instead, we will continue to use tox -e build to build Python-only wheels, and in parallel build Rust wheels with maturin. The theory here being that on a pip install, the following will happen:

  • On a "blessed" platform (that we build wheels for in our CI), you will automatically enjoy a Rust-powered version
  • On a "incompatible" platform (that we don't build wheels for, e.g. a new Python version), you will install the Python-only wheel and automatically enjoy the Python fallback

Play along at home:

maturin develop

Next steps:

Copy link

codecov bot commented Oct 28, 2024

Codecov Report

Attention: Patch coverage is 72.22222% with 5 lines in your changes missing coverage. Please review.

Project coverage is 86.04%. Comparing base (3bc67de) to head (a5b6fff).

Files with missing lines Patch % Lines
dissect/util/compression/lz4.py 76.92% 3 Missing ⚠️
dissect/util/compression/__init__.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #56      +/-   ##
==========================================
- Coverage   86.25%   86.04%   -0.21%     
==========================================
  Files          20       20              
  Lines        1302     1297       -5     
==========================================
- Hits         1123     1116       -7     
- Misses        179      181       +2     
Flag Coverage Δ
unittests 86.04% <72.22%> (-0.21%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Schamper Schamper marked this pull request as ready for review October 29, 2024 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant