rust-diplomat / diplomat

Experimental Rust tool for generating FFI definitions allowing many other languages to call Rust code
https://rust-diplomat.github.io/book/
Other
480 stars 45 forks source link

JS2 HIR Implementation #487

Closed ambiguousname closed 1 week ago

ambiguousname commented 1 month ago

Per #420, this is my ongoing effort to implement the HIR backend for Javascript and Typescript.

There's still quite a bit to be done (lots of backend functions with TODOs, entry-level matches for hir types, etc.), but this is for anyone to get a good look to see if there's any issues with the way that I'm approaching things.

This is mostly based on the Dart backend, with some added comments that were for my own understanding during development.

Let me know if there's anything I can clarify!

ambiguousname commented 1 month ago

Updated, all feature tests are now passing.

There are still quite a lot of TODOs and FIXMEs that involve things not covered in the feature tests, so I will be coming back to this later to try and fill in the gaps.

sffc commented 1 month ago

We should land something even if it's not complete because it allows other people to start contributing any missing pieces

ambiguousname commented 4 weeks ago

The notes doc I just removed had things that were mostly out of date. The only thing that I'd like to re-iterate here is that I make sure to test the build scripts on Node v20

ambiguousname commented 3 weeks ago

Note: test coverage for NestedBorrowFields would be good for a lot of features. I'll try to add that

ambiguousname commented 2 weeks ago

Since we're passing all checks, here's a list of everything that isn't done that was brought up during review.

Most of these I think can be iterated on in separate PRs:

ambiguousname commented 2 weeks ago

If there's any changes we'd like to make to this PR let me know. I think I'd like to make a push to get this ready to merge into main and branching off these items into separate issues and PRs. But if there's anything we'd like to address in this PR, let me know!

sffc commented 1 week ago

Some follow-ups were filed; please open the remaining ones.

ambiguousname commented 1 week ago

Done!