dashmap icon indicating copy to clipboard operation
dashmap copied to clipboard

add c interface

Open calvin2021y opened this issue 3 years ago • 2 comments

please consider add simple c interface for dashmap.

typedef uintptr_t HandleT;
typedef uint64_t KeyT;
typedef uint64_t ValT;

HandleT dashmap_new(void);
ValT dashmap_get(HandleT handle, KeyT key);
ValT dashmap_insert(HandleT handle, KeyT key, ValT val);
uintptr_t dashmap_length(HandleT handle);
void dashmap_destroy(HandleT handle);

calvin2021y avatar Jul 04 '22 13:07 calvin2021y

Seconding. With dashmap's impressive speeds, having an interface to another language would be a boon.

notgull avatar Jul 04 '22 14:07 notgull

For what it's worth, it's totally possible to create a separate crate to provide the C interface to DashMap, if somebody wanted to make one.

zicklag avatar Jul 28 '22 19:07 zicklag

Hi, I don't consider this to be a priority and I don't have the bandwidth to maintain bindings, in addition, there are a lot of problems caused by generics we would somehow need to address.

xacrimon avatar Aug 30 '22 18:08 xacrimon