native icon indicating copy to clipboard operation
native copied to clipboard

FFIgenPad

Open TheComputerM opened this issue 1 year ago • 0 comments

This is a PR for adding FFIgenPad (a GSoC proposal)

  • Bulk of the code is directly lifted from ffigen 14-wip, some major changes are
    • @Native bindings instead of DynamicLibrary cause of dart2wasm
    • use of a wrapper.c (used to make functions that play well with pointers) cause dart2wasm currently doesn't play well with structs
    • header_parser/clang_bindings/clang_types.dart and header_parser/clang_bindings/clang_wrapper.dart aim to provide 1:1 parity with clang_types and the Clang class in ffigen respectively, this leads to the only changes in many files being the import paths
  • parts which are constant and independent, (like most of lib/src/strings.dart) are exported directly from ffigen
  • The website is located in the web directory, currently uses nodejs.

FFIgenPad also requires a wasm build of libclang, bundled with wrapper.c, which currently is being tracked with git but there are no instructions on how to setup and build it, I'll probably add it soon though.


  • [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

TheComputerM avatar Aug 03 '24 18:08 TheComputerM