-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Rust 1.39 Update + Spring Cleaning #1419
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
d9a225a
to
42a1bf9
Compare
Changes LGTM. I'll approve this once the arm build is fixed as well. |
Do you have a quick reference resource you can link that explains why moving the crates under |
My personal take on this is I that it makes more sense as the source code is clearly separated from the documentation and other utilities. It is much easier to navigate through misc docs and tools as they don't mingle with rust code as well. |
I don't have one handy. However, you can look at it like this: just as a crate is structured using a Also, in this particular case, it's more tidy because this arrangement enables decoupling the firecracker and jailer crates. In the previous layout, the jailer |
Makes sense. I thought we enable some |
My esthetics only opinion is "+100". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do like this workspace reorganization better than the older one 👍 However, given that this PR is changing in an impactful way how Firecracker will look from now on, I think the entire team should give their approval on this or at least be informed of it before merge in order not to be taken by surprise.
|
||
[dev-dependencies] | ||
tempfile = ">=3.0.2" | ||
[workspace] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: your commit message misspells "workspace" twice (i.e. worspace)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FIxed.
@@ -39,9 +39,6 @@ def test_unittests(test_session_root_path, target): | |||
if MACHINE == "x86_64": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be a miss as I do not think there is a reason why we would not want to test all features on all architectures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A miss indeed. Fixed.
src/utils/src/structs.rs
Outdated
/// # Safety | ||
/// | ||
/// This is unsafe because the structs are initialized to unverified data read from the input. | ||
/// `read_struct_slice` should only be called for plain old data structs. It is not endian safe. | ||
// This lint check is now deprecated - https://github.com/rust-lang/rust-clippy/pull/3478/files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment still valid? What lint check is it refferring to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed. Looks like that comment had been left behind when the clippy override was removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this re-org is aesthetically pleasing. 👌
e9d4b06
Tidied up the cargo workspace a bit: - all sources are now placed in their respective crates, under `/src/<crate>`; - unified the jailer sources under the self-contained `/src/jailer` bin crate; - fixed `utils/src/lib.rs` copyright + some nitty tidying up; - arch-gated the `cpuid` crate to x86_64; - fixed some whitespace errors. Signed-off-by: Dan Horobeanu <[email protected]>
- cargo: configured the build dir via `.cargo/config`; - devctr: removed env variable used to override build dir; updated rust toolchain to 1.39; - clippy: added safety doc comments; - vsock: switched to using zeroed memory for the TX buffer, instead of `mem::uninitialized`, since the latter is both unsafe and deprecated by Rust 1.39. Signed-off-by: Dan Horobeanu <[email protected]>
Fixed a bunch of whitespace errors scattered throughout the repo. Signed-off-by: Dan Horobeanu <[email protected]>
Some of our crates were pinning their dependency versions. This was redundant, since we are using a versioned, worskspace-wide, Cargo.lock which we update with every release. It also resulted in `cargo update` not updating the depended-upon crates to their latest versions. This commit switches all dependecy version specifications to the latest version (i.e. the ">=<version>" syntax), and also updates Cargo.lock (via `cargo update`). Signed-off-by: Dan Horobeanu <[email protected]>
- Rust 1.35 cannot parse Firecracker's Cargo.lock somehow - While Rust's latest release is 1.40.0, we'd like to keep in sync with Firecracker upstream. firecracker-microvm/firecracker#1419 Signed-off-by: Kazuyoshi Kato <[email protected]>
- Rust 1.35 cannot parse Firecracker's Cargo.lock somehow - While Rust's latest release is 1.40.0, we'd like to keep in sync with Firecracker upstream. firecracker-microvm/firecracker#1419 Signed-off-by: Kazuyoshi Kato <[email protected]>
- Rust 1.35 cannot parse Firecracker's Cargo.lock somehow - While Rust's latest release is 1.40.0, we'd like to keep in sync with Firecracker upstream. firecracker-microvm/firecracker#1419 Signed-off-by: Kazuyoshi Kato <[email protected]>
- Rust 1.35 cannot parse Firecracker's Cargo.lock somehow - While Rust's latest release is 1.40.0, we'd like to keep in sync with Firecracker upstream. firecracker-microvm/firecracker#1419 Signed-off-by: Kazuyoshi Kato <[email protected]>
- Rust 1.35 cannot parse Firecracker's Cargo.lock somehow - While Rust's latest release is 1.40.0, we'd like to keep in sync with Firecracker upstream. firecracker-microvm/firecracker#1419 Signed-off-by: Kazuyoshi Kato <[email protected]>
- Rust 1.35 cannot parse Firecracker's Cargo.lock somehow - While Rust's latest release is 1.40.0, we'd like to keep in sync with Firecracker upstream. firecracker-microvm/firecracker#1419 Signed-off-by: Kazuyoshi Kato <[email protected]>
- Rust 1.35 cannot parse Firecracker's Cargo.lock somehow - While Rust's latest release is 1.40.0, we'd like to keep in sync with Firecracker upstream. firecracker-microvm/firecracker#1419 Signed-off-by: Kazuyoshi Kato <[email protected]>
- Rust 1.35 cannot parse Firecracker's Cargo.lock somehow - While Rust's latest release is 1.40.0, we'd like to keep in sync with Firecracker upstream. firecracker-microvm/firecracker#1419 Signed-off-by: Kazuyoshi Kato <[email protected]>
Reason for This PR
Tidy is good, tidy is love.
Description of Changes
/src/<crate>
;/src/jailer
; removed jailer dependency from the firecracker crate;.cargo/config
;mem::uninitialized
, since the latter is both unsafe and deprecated by Rust 1.39;License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license.
PR Checklist
[Author TODO: Meet these criteria. Where there are two options, keep one.]
[Reviewer TODO: Verify that these criteria are met. Request changes if not]
git commit -s
).clearly provided.
doc changes are included in this PR. Docs in scope are all
*.md
fileslocated either in the repository root, or in the
docs/
directory.code is included in this PR.
reflected in
firecracker/swagger.yaml
.this PR have user impact and have been added to the
CHANGELOG.md
file.unsafe
code has been added, or, the newly addedunsafe
code is unavoidable and properly documented.