https://kotlinlang.org logo
#gsoc
Title
# gsoc
c

Collins Onindo

03/14/2024, 10:10 AM
Hi @Artem Kobzar any guidelines on how to get started?
a

Artem Kobzar

03/14/2024, 11:27 AM
Hi Collins, nice to meet you. Thank you for being so interested. You can start from take a look on the already existed Node.js Skia binding (like this https://github.com/Brooooooklyn/canvas, or you could also pick another one) as a reference of writing N-API bindings for Node.js Also, you can check Skiko and try to compile it and make a few N-API wrapper functions wrappers that could be used from the JS code.
c

Collins Onindo

03/14/2024, 2:31 PM
Hi, it seems https://github.com/Brooooooklyn/canvas tie the api via rust and napi-rs https://napi.rs/, is this the way you had in mind for compose to access skia native functions? Also the c/c++ looks to be at https://nodejs.org/api/addons.html, a bit complicated for me, seems the Rust is more straightforward. As I'm more comfortable with Rust, is it okay if the sample and project goes on with Rust(if I am to tackle it that is)
Also, you can check Skiko and try to compile it and make a few N-API wrapper functions wrappers that could be used from the JS code.
Does that mean the end goal is to have app -> node api -> skiko -> skia or?
a

Artem Kobzar

03/14/2024, 2:58 PM
Exactly
c

Collins Onindo

03/18/2024, 7:03 PM
Hi, did a small demo at https://github.com/collinsonindo/node-skia, using skia-safe (https://crates.io/crates/skia-safe) and napi for the bindings, hit up some snags with rust lifetimes and napi limitations, but it is doable
🤩 1
🔥 1
a

Artem Kobzar

03/19/2024, 8:58 AM
The repo is 404 😞
c

Collins Onindo

03/19/2024, 2:35 PM
Sorry, made it private 😞
It should be visible now
Hi @Artem Kobzar, sorry for the delay in communication, I wrote my proposal, (currently draft) and was wondering if you have some time to review it in case there are things to be changed, Thanks
20 Views