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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.