Live data from Hacker News

Memory safety for web fonts

developer.chrome.com

1–10 of 230 posts

Re: Memory safety for web fonts

#6

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.

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.

Re: Memory safety for web fonts

#7

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.

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.

Re: Memory safety for web fonts

#9

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(
  >

Re: Memory safety for web fonts

#10

Earlier quoted context omitted.

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
Post reply on HN