Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

d.ts header for libmraa #102

Open
arfoll opened this issue Jan 20, 2015 · 2 comments
Open

d.ts header for libmraa #102

arfoll opened this issue Jan 20, 2015 · 2 comments

Comments

@arfoll
Copy link
Contributor

arfoll commented Jan 20, 2015

As discussed in #101 by @barais it would be great to provide a typeface d.ts header to libmraa.

@barais
Copy link

barais commented Jan 21, 2015

Ok I just release here the d.ts generator from hpp header

https://github.com/HEADS-project/mraa_hpp2ts_generator

I you disagree with the mapping of type you just have to change that file.
https://github.com/HEADS-project/mraa_hpp2ts_generator/blob/master/src/main/java/eu/heads/project/ts/HPPSourceParser.java#L61

It is a bit quick and dirty but I will keep improving it.

I also update the examples.
https://github.com/HEADS-project/mraa

@arfoll
Copy link
Contributor Author

arfoll commented Jan 25, 2015

That is quite cool, however I feel it's too complicated to add to our build system. How about I add this to our CI system so every time we make a new build it generates a d.ts file and uploads it somewhere so people can grab it?

The mapping of types still seems a bit off, I'm not too sure how your program works but uint8_t pointers should get mapped to a node_buffer which I'm not sure is supported in general js? But that's what we expect as an input in mraa.node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants