Skip to content

Conversation

@rina23q
Copy link
Member

@rina23q rina23q commented Dec 7, 2025

This PR enables the bindgen feature of rquickjs crate and generates bindgen scripts during the compilation.

Several remarkable points:

  • Clang is required, therefore, meta-clang layer is added.
  • Specifying LIBCLANG_PATH is required to search libclang.so and other libclang related shared objects.
  • BINDGEN_EXTRA_CLANG_ARGS is defined in rust-bindgen. It supports per-target arguments as BINDGEN_EXTRA_CLANG_ARGS_<TARGET>. However, this <TARGET> must be underscore separated triple.
    (e.g. ✅ armv7_poky_linux_gnueabihf, ❌ arm7-poky-linux-gnueabihf)
  • For some reason, build.rs of quickjs is also run for host system as well as the target system. To prevent confusion between two, BINDGEN_EXTRA_CLANG_ARGS needs to be defined per target...
  • By default, bindgen cannot find the include directory of the target toolchains. If you don't add the specific include path, bindgen uses the host include path.
  • TARGET_SYS from Yocto is NOT equal to RUST_TARGET_SYS from meta-lts-mixins-rust. (arm-poky-linux-gnueabi vs armv7-poky-linux-gnueabihf). Critically, the former indicates soft-float, while the latter does hard-float...

Successor of #380, #374.

Signed-off-by: Rina Fujino <rina.fujino.23@gmail.com>
Signed-off-by: Rina Fujino <rina.fujino.23@gmail.com>
@rina23q rina23q added the ci trigger ci build label Dec 7, 2025
Signed-off-by: Rina Fujino <rina.fujino.23@gmail.com>
@rina23q rina23q added ci trigger ci build and removed ci trigger ci build labels Dec 12, 2025
@rina23q rina23q self-assigned this Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci trigger ci build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant