Rust Bindings

Đang mở
#1,891 4 bình luận 0 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
20/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
cpp, rust
Lĩnh vực
api

Hướng nghiên cứu

No files or tests are named. Start by reviewing the existing C++ and Python binding arrangements, then evaluate the proposed Cargo packaging, API-version compatibility, repository separation, license, and native socket-level design. Done would be a usable Rust binding with an agreed version-support and ownership model.

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

Mô tả

I'm starting to look into some new projects in Rust. I'm willing to work on and contribute the bindings, but there are some things to think about:

  1. The bindings need to live Cargo, the Rust package manager, as a primary method of installation. This also handles hosting documentation at https://doc.rust-lang.org. You can bundle dependencies in the same way that we currently ship/install the C++ and Python bindings, but this is sort of an anti-pattern in Rust (with the exception being OS distros that need to provide Rust dependencies as a part of other packages but it is typically NOT intended for code compilation for the end user).
  2. The above means that the OLA version may be decoupled from the Rust bindings version. I propose establishing an API version that can be queried from OLA. The bindings would then check if the OLA they are communicating with is supported by the binding version. This would also significantly help with #1451 where similarly the Python bindings could be decoupled if published to Pypi. I will make a separate issue/initial pull for this. Another nice consequence of this is possibly documentation about the underlying socket API that would allow for any binding to be created more trivially in the future.
  3. The above means that possibly there should be a separate repo for the Rust bindings since they wouldn't necessarily be tied to an individual OLA version/OLA API version. It would be strange also (in my opinion) for the Rust binding version to match the OLA version if it supports multiple OLA versions (we can limit it possibly to the last 1 or 2 major/minor versions released or found in popular distros (i.e. all of 0.10.x) for now.
  4. Because of Rust's recompilation/static linking requirements, LGPL may not be the best license. It is not necessarily always possible to replace the binary components of a Rust library with another in the same way you can with C/C++ shared libraries. It seems that MPL is the closest (copyleft). Apache 2.0 and MIT are also popular (but not copyleft).
  5. This should be a native binding, not a C++/shared library wrapper. There are some threading and other bits in the C++ API that don't make sense to wrap in Rust and should be written in Rust. Since it will be very separate code (working at the socket level and not a shared library) it further makes sense to be a separate repo (in my opinion).

I think I will probably start this at some point in my own repo and then I would be happy to transfer ownership or fork to another repo once I have something usable.

Ngôn ngữ chính
C++
Star
773
Fork
233
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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 OpenLightingProject/ola

Tất cả issue của OpenLightingProject/ola

Issue tương tự

Thêm issue về C++

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.