Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datalevin as a C Shared library #37

Open
huahaiy opened this issue Mar 1, 2021 · 4 comments
Open

Datalevin as a C Shared library #37

huahaiy opened this issue Mar 1, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@huahaiy
Copy link
Contributor

huahaiy commented Mar 1, 2021

For other languages to use Datalevin, it is ideal to make Datalevin a C shared library. However, it is inconvenient to use Datalevin if there is no C library that can handle EDN data. It is OK to treat query/transaction input as plain text, but it would be much more convenient if the results could be consumed by C easily. Unfortunately, there's no C library for EDN data. Another option is for Datalevin to output JSON results instead, with inevitable loss of type information.

I think this problem does not just affect Datalevin, but also the whole Clojure ecosystem. The adoption of Clojure is hindered by the lack of interoperability with the native world, which is primarily built on top of C. An EDN C library would hugely alleviate this problem.

@huahaiy
Copy link
Contributor Author

huahaiy commented Mar 11, 2021

@huahaiy
Copy link
Contributor Author

huahaiy commented Mar 22, 2021

@huahaiy huahaiy added the enhancement New feature or request label Apr 23, 2021
@theSherwood
Copy link

@huahaiy What you describe fits my situation exactly. I'm seriously wanting to use Datalevin but don't want to have to use Clojure to do it. A C library would be amazing.

Have you seen this work on an EDN parser in C++? https://github.com/edporras/edn_turbo/tree/main/ext/edn_turbo

To be honest, I'd be nearly as happy with JSON output as the Clojure collection types don't really have C corollaries anyway.

@huahaiy
Copy link
Contributor Author

huahaiy commented Jan 23, 2023

We will go JSON route for this. See #182

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants