Hacker News new | past | comments | ask | show | jobs | submit login

I get it, but switching to Rust places the codebase on an Island I can't easily get to. I am already switching between C++, Swift, Kotlin, and Python on an almost daily basis.



Was this a codebase you were working with regularly already? This project exposes a C FFI, so unless you were already working in the guts here, I don't think this should affect you terribly.

edit: I'm actually not seeing the C FFI, looking at the library. It must be there somewhere, because it's being used from a C++ codebase. Can somebody point to the extern C use? I'm finding this inside that `fontations` repository:

  > rg 'extern "'
  fontations/fauntlet/src/font/freetype.rs
  161:extern "C" fn ft_move_to(to: *const FT_Vector, user: *mut c_void) -> c_int {
  168:extern "C" fn ft_line_to(to: *const FT_Vector, user: *mut c_void) -> c_int {
  175:extern "C" fn ft_conic_to(
  187:extern "C" fn ft_cubic_to(
  >


We're using https://cxx.rs/ to create the bindings and FFI interface. That's not provided with Fontations, but this bit is part of the Chromium and Skia integration. The code is here: https://source.chromium.org/chromium/chromium/src/+/main:thi...


Chromium is >35 million lines of code, switching languages all in one go just isn't happening.


For me it was already hard to get into chromium's code base. It takes too long to build and there's just so much to understand about it before you can make changes.

It might help if there was some way to play around with the APIs without having to wait so long for it to build. But as far as i know that's not currently possible.


You've already had some replies for the C FFI side of things, you might also be interested in maturin & PyO3 for python bindings. I haven't looked if they've exposed some python interface (guessing not), but Rust/Python interop is often pretty easy: https://www.maturin.rs/


just get the AI to understand it for you /s


It is not a matter of understanding source code. It is matter of bridging, building, and linking another language with yet another binary layout and interface.


It's an extern c interface. That's not any different than dealing with a c library


That is good to know.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: