David's Blog

ffi posts

All posts with the tag ffi.

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.

How to use Rust's macros

Dec 27, 2024
In this article, we will explore Rust's macros and build a program that demonstrates their usage.

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

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

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

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

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..

How to create a simple chat server and client using Rust's networking capabilities

Dec 27, 2024
In this article, we will explore how to create a simple chat server and client using Rust's networking capabilities. We will use Rust's standard library to implement basic networking functionality and create a text-based interface for sending and receiving messages between clients.

Building Web Applications with Rocket for Rust

Dec 27, 2024
In this tutorial, we'll explore how to build a web application using the Rocket web framework for the Rust programming language. Rocket is a fast, type-safe, and easy-to-use framework that allows us to build web applications quickly, leveraging the power and safety of the Rust language.

Secure Hashing with SHA-2 in Rust using the `sha2` Crate

Dec 27, 2024
In this technical article, we will explore how to use the `sha2` crate in Rust to compute secure hash values using the SHA-2 family of cryptographic hashing algorithms.

Weather APIs in Rust

Dec 27, 2024
In this article, we will explore how to create a simple command-line weather forecast application in Rust. We will use the reqwest crate for making HTTP requests and the serde crate for handling JSON data.
© Copyright 2024 by FriendlyUsers Tech Blog. Built with ♥ by FriendlyUser. Last updated on 2024-02-20.