Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

v4 -> v5 upgrade path

Đang mở
#442 1 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
30/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
rust
Lĩnh vực
build-system, security

Hướng nghiên cứu

Bắt đầu bằng việc xem xét dependency Cargo và cấu hình build cho boring-sys v4 và v5, đặc biệt là thuộc tính links và dependency tùy chọn được đề xuất. Trước tiên, hãy xác minh hành vi khi v5 có sẵn trên crates.io, sau đó kiểm thử đường dẫn nâng cấp với boring v4 và boring-sys v5 cùng nhau. Hoàn tất có nghĩa là release tương thích tránh được các xung đột links trong khi vẫn duy trì chức năng v4 được hỗ trợ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

v5

Cargo won't allow boring-sys v4 and boring-sys v5 coexist in one project (thanks to links property), which generally is a good idea, because their C symbols would conflict. However, this means that projects can't upgrade to boring v5 if any of their dependencies use boring v4. Such all-at-once upgrade is much harder and gets slowed down by the slowest-to-upgrade dependency.

It's relatively easy to make boring v5 support being used with boring-sys v4, but it's the less interesting combination, since the sys crate is more important to upgrade.

Unfortunately, making boring v4 use boring-sys v5 is more complicated. We can't simply release a version of boring v4 that accepts both versions of the sys crate, because the sys v5 crate has has only a subset of sys v4 functionality. cargo update eagerly picks the latest version of dependencies, so it would be a breaking change.

I can't simply use a feature flag as an opt-in to sys v5, because Cargo is overly restrictive with links, and wants to make a single universal Cargo.lock that takes into account even optional disabled dependencies.

Given the limitations, my current idea is to release a version of boring-sys v4 that doesn't have a links property, but optionally depends on boring-sys v5. Make it skip its own build and re-export v5 crate when a feature flag is enabled. This will be easier to test once v5 is on crates.io, so we should release v5 first.

Ngôn ngữ chính
Rust
Star
526
Fork
178
Merge trung bình
16 giờ 47 phút
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cloudflare/boring

Tất cả issue của cloudflare/boring

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.