Rust 1.39 Update + Spring Cleaning#1419
Rust 1.39 Update + Spring Cleaning#1419acatangiu merged 4 commits intofirecracker-microvm:masterfrom
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". |
dianpopa
left a comment
There was a problem hiding this comment.
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.
nit: your commit message misspells "workspace" twice (i.e. worspace)
| @@ -39,9 +39,6 @@ def test_unittests(test_session_root_path, target): | |||
| if MACHINE == "x86_64": | |||
There was a problem hiding this comment.
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.
A miss indeed. Fixed.
src/utils/src/structs.rs
Outdated
| /// | ||
| /// 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.
Is this comment still valid? What lint check is it refferring to?
There was a problem hiding this comment.
Removed. Looks like that comment had been left behind when the clippy override was removed.
sandreim
left a comment
There was a problem hiding this comment.
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 <dhr@amazon.com>
- 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 <dhr@amazon.com>
Fixed a bunch of whitespace errors scattered throughout the repo. Signed-off-by: Dan Horobeanu <dhr@amazon.com>
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 <dhr@amazon.com>
- 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 <katokazu@amazon.com>
- 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 <katokazu@amazon.com>
- 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 <katokazu@amazon.com>
- 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 <katokazu@amazon.com>
- 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 <katokazu@amazon.com>
- 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 <katokazu@amazon.com>
- 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 <katokazu@amazon.com>
- 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 <katokazu@amazon.com>
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
*.mdfileslocated 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.mdfile.unsafecode has been added, or, the newly addedunsafecode is unavoidable and properly documented.