Rust in lib-common, Part 1: Integrating Rust in a Waf-based C Build System

This is Part 1 of a multi-part series on integrating Rust into a large C codebase.

  • Part 1: Integrating Rust in a Waf-based C Build System
  • Part 2: First Rust Component: Rewriting farchc (WIP)

Introduction

lib-common is a C library developed by Intersec . It provides core utilities (strings, containers, memory management), networking (HTTP, RPC, event loop), serialization through IOP (Intersec Object Packer, similar to Protocol Buffers), etc. It targets Linux environments and has been in active development for many years.

Read more

Adding Class Attributes to Dynamic Cython Extension Types Using Metaclasses

Introduction

Cython is a programming language that makes writing C extensions for Python as easy as Python itself. It lets us write Python code that calls back and forth from and to C/C++ code natively, and compiles to efficient C code usable as a Python extension module.

At Intersec , we use Cython in lib-common , our open-source C library. One of its key components is IOPy, the Python binding for our IOP serialization framework (similar to Protocol Buffers). IOPy dynamically creates Python classes from IOP type definitions at DSO load time, and each class needs to hold a pointer to its C type descriptor for fast serialization.

Read more