Need some insights about the FFIGenpad sample project

107 views
Skip to first unread message

Sahil Kachhap

unread,
Feb 24, 2024, 7:51:31 AMFeb 24
to dart-gsoc
Hello Everyone,
I am Sahil, and I wanted to know what's the expected flow of this sample project: "Compile some C code to wasm and call it from a webapp". 

Here's my understanding from the given project idea:
We provide C headers as input in our webapp -> use ffigen to generate dart bindings -> call js through js-interop feature which further calls wasm .

Please correct me if I am wrong here. Any suitable resource to understand more about this will be appreciated.

Daco Harkes

unread,
Feb 26, 2024, 5:53:11 AMFeb 26
to Sahil Kachhap, dart-gsoc, Jackson Gardner, Prerak Mann
Hi Sahil,

Nice to meet you!

The webapp should do the following for our user:
1. They paste in a C header in the UI.
2. Somehow the webapp runs FFIgen on it.
3. The user sees generated dart bindings in the UI.

Now step 2 is the interesting part, how do we achieve that:
It should call WASM indeed.
One of the difficult tasks in this project is how to compile libclang (C/C++ code) and package FFIgen (Dart code) to WASM so that we can call it from the webapp.
For the sample project you should explore the first part of this: compile some C/C++ code to WASM and call it from a UI.

Kind regards,

 •  Daco Harkes
 •  Software Engineer
 •  dacoh...@google.com 


--
You received this message because you are subscribed to the Google Groups "dart-gsoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dart-gsoc+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dart-gsoc/acb55859-e672-487e-917c-b26d8f6dd2b6n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages