Chapter 8. Interfacing with other languages

This chapter covers

  • Getting to know Nim’s foreign function interface
  • Distinguishing between static and dynamic linking
  • Creating a wrapper for an external C library
  • Using the JavaScript backend
  • Wrapping JavaScript APIs

For many years, computer programmers have been writing software libraries in various programming languages. Many of these libraries have been in development for a very long time, accumulating features and maturing over the years. These libraries are not typically written in Nim; instead, they’ve been written in older programming languages such as C and C++.

When writing software, you might have required an external C library to perform a task. A good example of this is the OpenSSL ...

Get Nim in Action now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.