ref-cast VS rust-bindgen

Compare ref-cast vs rust-bindgen and see what are their differences.

ref-cast

Safely cast &T to &U where the struct U contains a single field of type T. (by dtolnay)

rust-bindgen

Automatically generates Rust FFI bindings to C (and some C++) libraries. (by rust-lang)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
ref-cast rust-bindgen
3 50
174 4,131
- 2.3%
7.4 9.0
27 days ago 3 days ago
Rust Rust
Apache License 2.0 BSD 3-clause "New" or "Revised" License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

ref-cast

Posts with mentions or reviews of ref-cast. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-01-30.
  • create a &Struct for a &Value
    1 project | /r/rust | 30 Apr 2023
    Yes, that's possible if you use repr(transparent). And as always David Tolnay has a crate for that: https://github.com/dtolnay/ref-cast
  • When Rust hurts
    1 project | /r/programming | 17 Feb 2023
    Actually you can, as long as the newtype struct has #[repr(transparent)]. The ref-cast crate makes it easy to do this without having to (directly) use unsafe code!
  • Hey Rustaceans! Got a question? Ask here (5/2023)!
    19 projects | /r/rust | 30 Jan 2023
    You can add #[repr(transparent)] and then call transmute(), or use https://github.com/dtolnay/ref-cast (which is exactly what it does anyway, providing a safe interface).

rust-bindgen

Posts with mentions or reviews of rust-bindgen. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-06-20.

What are some alternatives?

When comparing ref-cast and rust-bindgen you can also consider the following projects:

kanin - A microservice framework for AMQP, protobuf and Rust.

Introducing .NET Multi-platform App UI (MAUI) - .NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.

auto-future - A way to easily build structs that can be turned into futures

cxx - Safe interop between Rust and C++

autocxx - Tool for safe ergonomic Rust/C++ interop driven from existing C++ headers

JNA - Java Native Access

vulkano - Safe and rich Rust wrapper around the Vulkan API

CC - A small, usability-oriented generic container library.

cc - Command line crypto currency value converter.

win32metadata - Tooling to generate metadata for Win32 APIs in the Windows SDK.

surrealdb - A scalable, distributed, collaborative, document-graph database, for the realtime web

SWIG - SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages.