Skip to content
This repository was archived by the owner on Dec 14, 2021. It is now read-only.
This repository was archived by the owner on Dec 14, 2021. It is now read-only.

Support for Rust #16

@Champii

Description

@Champii

Hello !

I've started the work concerning the rust bindings of SourcetrailDB. It is a (very) early (and non yet working) version of those, made with rust-bindgen.

You can see the progress and contribute at https://github.com/Champii/SourcetrailDB/tree/master/resources_rust

The current approach is to use rust-bindgen directly on the generated static library, but that may be inefficient as rust-bindgen does not handle std types well (std::string for example). Their doc recommend to generate them all as opaque types, but then we lose the ability to use them.

One of the possible workaround is to create a C ABI to interface the C++ code with Rust, or to try the method used by the python bindings and wrap the most commonly used features in a lightweight and thus Rust-friendly C++ library.

I'll try them both and consider the one that fit the most.

Feel free to share your point of view on the matter, and/or throw some suggestions on the best way to handle that !

If I can be of any help, I'd be glad to :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions