DelSkayn / rquickjs

High level bindings to the quickjs javascript engine
MIT License
431 stars 58 forks source link

[IDEA] Export typescript types #287

Closed Sytten closed 3 months ago

Sytten commented 3 months ago

I am working on an SDK for my users to run code on our Rust core. So I am a bit invested in https://github.com/DelSkayn/rquickjs/pull/133, but further than that it would save me a lot of time if I could generate the typescript types for all my objects and their functions.

I don't know how hard that would be though, other crates seem to have done it for the structure (but not the functions):

Unsure if this something you would like native (behind a flag) in rquickjs or it is out of scope for it?

DelSkayn commented 3 months ago

I don't think this is something I want to support. I also commented in the PR but I find typescript support already outside of the scope of this library as I would like to stick to just the functionality that QuickJS provides.

I am willing to add functionality to rquickjs to support external crates to implement such a feature but I don't think rquickjs itself should implement this.