Dhanushka's Blog

Collection of all my blogs.

How to use Rust's Foreign Function Interface

How to use Rust's Foreign Function Interface

Dec 27, 2024

Rust's Foreign Function Interface (FFI) allows Rust code to interact with code written in other programming languages, such as C. In this article, we will explore Rust's FFI capabilities by building a program that interfaces with a C library using Rust's FFI. Specifically, we will use Rust to call a C library function that computes the sum of two integers.

serde_json: A Rust Library for Serialization and Deserialization

serde_json: A Rust Library for Serialization and Deserialization

Dec 27, 2024

serde_json is a Rust library that can be used to serialize and deserialize JSON data. It is a popular library that is used by many Rust projects.

Unsafe Rust: Going Below the Abstraction

Unsafe Rust: Going Below the Abstraction

Dec 27, 2024

Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety.

Cross-Language Interoperability: Exploring Rust's FFI, WebAssembly, and gRPC

Cross-Language Interoperability: Exploring Rust's FFI, WebAssembly, and gRPC

Dec 27, 2024

In this article, we will explore three techniques for cross-language interoperability: Rust's FFI, WebAssembly, and gRPC.

C and C++ Interoperability in Rust: Exploring FFI

C and C++ Interoperability in Rust: Exploring FFI

Dec 27, 2024

In this article, we will explore Rust's FFI and demonstrate how to call functions from C and C++ libraries in Rust, allowing you to leverage the power of these languages while enjoying the benefits of Rust.

How to use sycnronization primitives in Rust

How to use sycnronization primitives in Rust

Dec 27, 2024

In this article, we will explore Rust's synchronization primitives and build a program that uses mutexes to synchronize access to a shared data structure between multiple threads..

© Copyright 2026 by Dhanushka's Blog. Built with ♥ by Dhanushka. Last updated on 2026-02-18.