What is a Foreign Function Interface?

Опубликовано: 11 Февраль 2024
на канале: Code With Cypert
738
36

Foreign function interfaces, or FFI, allow you interface with code written in another language. For example, maybe your application is written in JavaScript and running on something like Bun, but you'd like to make use of some rust code that you have access to.

Well, you're able to modify or wrap the rust code to expose a FFI and then compile that as either a statically-linked library or a dynamic link library.

Today, I'll show you how to compile out a dynamic link library from Rust code and then use that in your TypeScript application running on Bun. That being said, even if you don't use these tools, you can still leverage Foreign Function Interfaces in a plethora of other languages, too, so the ideas should still be relevant even if you're working with something like Python or Java.


На этой странице сайта вы можете посмотреть видео онлайн What is a Foreign Function Interface? длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Code With Cypert 11 Февраль 2024, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 738 раз и оно понравилось 36 зрителям. Приятного просмотра!