impero-com / impero-com/typebinder

Support fixed-size array ?

Open
#51 1 comment 0 reactions 0 assignees View on GitHub
enhancement good first issue help wanted
Dominant language
Rust
Stars
22
Forks
3
PR merge metrics
No merged PRs in 30d

Description

![image](https://github.com/user-attachments/assets/7aa6e182-eeeb-4d03-b2c1-ffa213e438ad)

Typebinder should support outputting an array of fixed size in TS when using an array of fixed size in Rust, just like we do for tuples.

* When the value is provided as a literal number, this is feasible.
* When the size is provided as a const evaluated by Rust at compile-time, we're essentially doomed. Rewriting `typebinder` from `rust-analyzer` tooling may fix this issue ?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting the existing tuple handling in typebinder and how Rust array types are represented when generating TypeScript. Compare literal array sizes with sizes supplied by compile-time constants, and determine what rust-analyzer tooling exposes. Done means fixed-size Rust arrays with literal lengths produce the corresponding TypeScript representation, with the supported limitations documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, typescript
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.