Rewrote shadow's main function in rust#1633
Merged
stevenengler merged 3 commits intoshadow:mainfrom Sep 13, 2021
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1633 +/- ##
==========================================
+ Coverage 54.72% 54.75% +0.02%
==========================================
Files 141 140 -1
Lines 18587 18468 -119
Branches 4466 4436 -30
==========================================
- Hits 10172 10112 -60
+ Misses 5744 5707 -37
+ Partials 2671 2649 -22
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
0e830ae to
ecd3d92
Compare
Now we can call its 'init()' function.
ecd3d92 to
2b585ac
Compare
sporksmith
approved these changes
Sep 10, 2021
2b585ac to
b2c9c12
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Most of the changed lines are just bindings. The main change is the rewriting of
main_runShadow()incore::main::run_shadow(). The general flow should be the same, but a few things have been re-organized.A few parts that can't easily be converted to rust (for example checking the glib version) remain in the C code, but the rest has moved to rust.
This is currently using an unreleased version of nix for get/setrlimit support, so it either needs to wait for a new release, or needs a workaround.Using libc for now.