marker VS diplomat

Compare marker vs diplomat and see what are their differences.

marker

An experimental linting interface for Rust. Let's make custom lints a reality (by rust-marker)

diplomat

Experimental Rust tool for generating FFI definitions allowing many other languages to call Rust code (by rust-diplomat)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
marker diplomat
2 6
137 446
1.5% 6.7%
9.4 8.8
4 months ago 7 days ago
Rust Rust
GNU General Public License v3.0 or later GNU General Public License v3.0 or later
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.

marker

Posts with mentions or reviews of marker. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-01-25.
  • Blog Post: Next Rust Compiler
    7 projects | /r/rust | 25 Jan 2023
    Check out this, which aims to implement said stable interface!
  • 1Password releases Typeshare, the "ultimate tool for synchronizing your type definitions between Rust and other languages for seamless FFI"
    14 projects | /r/rust | 22 Nov 2022
    Hey, I might be able to give some input how I deal with it in [rust-linting](https://github.com/rust-linting/rust-linting). For some context, the project needs to load several dynamic libraries and provide each of them with an abstract syntax tree. Serializing and deserializing the types for every step would most likely be too expensive. That's why I opted for a Rust <-> Rust FFI. There are two parts of this: 1. The loaded libraries needed to accept data from a driver. For this, I generate functions in the library crates which are marked as `extern "C"` and only use FFI safe types. Passing information to the loaded crates then always calls the generated functions, which intern call access a thread local struct instance in the dynamic crate. It's important that the instance implement a specific trait. For the library creation, it seems like magic. 2. Callbacks. The loaded libraries need to pass information back to the driver. For this, I use a struct with function pointers. These are also marked as `extern "C"` and need to only use FFI safe types. The definition of FFI safe, is a bit difficult. Slices, `str`, `Option<>` and most of the rusts STD types don't have a stable layout to the point, that it can change between compilations with the same compiler. Therefore, it's required that each passed type is `#[repr(C)]`. Options are wrapped in an enum, which has `#[repr(C)]`, slices and strings are dismantled into a data pointer and a length. On the receiving and they're reconstructed again. A small warning. I'm not an expert on FFI interfaces. My implementation would probably have some problems with lifetimes, if I'd use a slightly different memory model. So far, this has worked well (Besides the required boilerplate). The project is currently sadly lacking documentation, as it's still under heavy development. If you want, feel free to lock around the code base. The stable types and most of the interface is inside the `linter_api` crate.

diplomat

Posts with mentions or reviews of diplomat. 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 marker and diplomat you can also consider the following projects:

uniffi-rs - a multi-language bindings generator for rust

flutter_rust_bridge - Flutter/Dart <-> Rust binding generator, feature-rich, but seamless and simple.

cbindgen - A project for generating C bindings from Rust code

wgpu - Cross-platform, safe, pure-rust graphics api.

moat - mobile type (currently Swift, Kotlin) generation from Haskell types

airbax - Exception tracking from Elixir to Airbrake

bifrost

pigeon - iOS and Android push notifications for Elixir

redtube - Redtube API Wrapper written in Elixir

Flutter - Flutter makes it easy and fast to build beautiful apps for mobile and beyond

rfcs - RFC process for Bytecode Alliance projects

reduze - Zig program reduction is upstream in compiler due to various parser + formatter interactions.