Comments (11)
That integration model may be outdated with modern package management; would better code organization be a consequence of Rust integration, and lead to a more maintainable project overall?
from libsql.
I think so, yes - C is kind of a lingua franca for embedding
from libsql.
The biggest issue for introducing Rust is that it threatens the "just a .c and .h file" integration model that sqlite has, and it's indeed very nice and simple. We'll need to be very careful when designing the first Rust addition, but I think that "just a .c, .rs and .h file" is not a huge stretch.
from libsql.
One year later, I think it's safe to say we're not moving away from Rust. Closing.
from libsql.
hello @fire ! I think this would be best stated as a Discussion (https://github.com/libsql/libsql/discussions)
But in the mean time, what would you suggest?
from libsql.
I don't know, but it is a barrier to giving libsql the greatest reach. Also can be a discussion.
from libsql.
@fire Can you elaborate on what your concern is? I don't think Rust as a language is that controversial choice, even the Linux kernel has support for it now. We absolutely should not close the door for people writing extensions in C, C++, Zig, or other languages, but I don't necessarily see a problem with having Rust code in the tree?
from libsql.
One benefit of the C agglomeration file is that it makes makes compilation to wasm quite easy; here I show how to use it to compile an extension into the build.
I imagine that for apps which embed sqlite, the "one c and h file" is a great boon - perhaps libsql will not be intending to be easily embeddable, but it should be clear about it if so.
from libsql.
In my mind, keeping compatibility with the file format is 110% crucial.
Keeping compatibility with the existing APIs is 100% crucial (but adding new APIs should be fine, doing good async on top of the existing APIs will be hard).
The rest is good to have, and we should keep if possible, but at some point not crucial.
Is the "one c file" help with embedding this in other applications that are not written in C?
from libsql.
If fixed-file-set is critical to that degree, it's feasible to merge Rust directories into single files by translating files to mod
scopes, as they aren't capable of cross-contamination of scope content. As for being a universal language, Rust is rapidly approaching that point, and will likely only improve with it's adoption by Linux.
If these are the priorities, I'd recommend using a C header to describe the Rust-extended contents alongside those exposed by the .c
file, as suggested by @psarna above.
from libsql.
I am willing to be convinced, but for me, the interesting aspect of "embedded" is that you add attach to your application through an API, versus going through some remote call in a different process or network.
The one .c /.h file is one way to attach this to your application, but so is a .so library that can be statically or dynamically linked to your application.
I think it is premature to make the decision of which will be. There is an obvious benefit in keeping sqlite's way of embedding, and if and when it becomes a problem for integrating something else we can reevaluate.
from libsql.
Related Issues (20)
- ERROR libsql::replication: replicator sync | database disk image is malformed HOT 11
- Creating namespaces in sqld following the docs does not work. HOT 2
- Switch to locking_mode EXCLUSIVE in libSQL server? HOT 2
- Feature request: support for `begin concurrent`
- How to enable the `attach` permission for databases HOT 1
- Improve database connection builder API? HOT 1
- Go API: Compile/Link error on Linux with Embedded Replication library
- CHECK failure not propagated on failing INSERT/UPDATE HOT 2
- libsql-ffi build failed on Windows HOT 4
- Issue: pyo3_runtime.PanicException: not yet implemented
- The stream expired due to inactivity with SQLC and turso
- missing `libsql-server-v0.24.19/source.tar.gz` HOT 5
- Sync hangs for a very long time when using archived database HOT 2
- failed to build 0.24.20 HOT 1
- Having trouble syncing in Nuxt3 – Embedded Syncs works with Nuxt x Vercel?
- Foreign key referencing a non-primary field results in `ValueError: foreign key mismatch` when using `ON CONFLICT` HOT 1
- turso not working with laravel
- Implement Statement::raw_bind_parameter() API HOT 2
- turso with Bun.sh issue HOT 1
- Conditionless batch support in libSQL remote protocol
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libsql.