0xMiden / 0xMiden/web-sdk

Keep types synced between Rust and Typescript

Đang mở
#118 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
TypeScript
Star
1
Fork
21
Merge trung bình
12 giờ 14 phút
Pull request đã merge (30 ngày)
41

Mô tả

## Sync types between Rust and Typescript:

Now that we're fully using Typescript for the rust-client (#1171), it'd be nice to keep updated types
that are shared between Rust and Typescript, there's some potential options we can use:

- [tsync](https://github.com/Wulf/tsync), one downside of this is that the type conversion is too simple, eg: Vec gets translated into a Array, which can bring troubles.
- [tsify](https://github.com/madonoharu/tsify), this looks like a good approach, but I think it can get tricky.
- [gents](https://github.com/ImJeremyHe/gents).
- Do it manually. Not ideal of course, but since we already have a particular setup, maybe the manual approach
(i.e. keep types in sync by simply writting them) is the best, and it can give us control over the finer details.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Look at the rust-client integration from issue #1171 to understand the current setup. Evaluate the listed tools (tsync, tsify, gents) for generating TypeScript types from Rust structs, focusing on how they handle complex types like Vec. Decide on an approach and implement a sync mechanism, ensuring the types are kept in sync across both codebases.

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

Đánh giá

Công nghệ
rust, typescript
Lĩnh vực
backend-api-design, tooling
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

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.