-
Notifications
You must be signed in to change notification settings - Fork 15
pyapi: generate basic python bindings with PyO3 #165
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
Conversation
02bca72 to
84949bc
Compare
Codecov Report
@@ Coverage Diff @@
## master #165 +/- ##
==========================================
- Coverage 14.80% 14.61% -0.19%
==========================================
Files 5 5
Lines 466 472 +6
Branches 86 87 +1
==========================================
Hits 69 69
- Misses 377 383 +6
Partials 20 20
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
84949bc to
9bbafa9
Compare
|
So I managed to expose the DriverType and DriverInitParam types to Python. It might not be the best way, but it works There is an opened issue on PyO3 to discuss how they should implement and expose Rust enum to Python. |
|
Note: I had to remove the conditional compilation in DriverType: But this is what we wanted with #151 anyway, so i will rebase once this other PR merged. |
7dff700 to
1d2e2c2
Compare
951357c to
532bd02
Compare
|
Ok, so, this implementation is not working: let mut buffer = Vec::with_capacity(size);
self.driver.read_physical(paddr, &mut buffer).map_err(PyMicrovmiError::from)?;
debug!("buffer = {:?}", buffer);but this one is: let mut buffer2: [u8; 1024] = [0; 1024];
self.driver.read_physical(paddr, &mut buffer2).map_err(PyMicrovmiError::from)?;
debug!("buffer2 = {:?}", buffer2); |
d8a95c9 to
168e154
Compare
|
Ok, so the catch was that This is fixed now. |
8a684e0 to
7112bf2
Compare
|
@rageagainsthepc i fixed another bug in the Xen read implementation :) buf[buf_start..buf_end].copy_from_slice(&page[page_start..page_end]);⬆️ it's fixed now, and volatility works |
ed2e5ab to
d4414ab
Compare




Generate (basic) python bindings to initialize libmicromi from Python, based on
PyO3fix #162