-
Notifications
You must be signed in to change notification settings - Fork 286
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
make libsql client a valid target for cloudflare workers #504
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No real request changes yet because I don't know exactly what path we should take.
@@ -1,3 +1,4 @@ | |||
/target | |||
.vscode/ | |||
.idea/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add this to your global gitignore https://gist.github.com/subfuzion/db7f57fff2fb6998a16c so you don't need to add it to every project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same could be said about .vscode/
path ;)
libsql/src/database.rs
Outdated
@@ -163,15 +164,27 @@ cfg_replication! { | |||
|
|||
cfg_hrana! { | |||
impl Database { | |||
#[cfg(not(feature = "hrana-cf"))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this breaks how features should work in rust. They must be additive aka enabling A and B shouldn't disable features from B, since another crate in the workspace can enable the feature B and break code that depended on A.
libsql/src/local/impls.rs
Outdated
#[cfg_attr(feature = "hrana-cf", async_trait::async_trait(?Send))] | ||
#[cfg_attr(not(feature = "hrana-cf"), async_trait::async_trait)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is the right approach we should take since we need these features to be additive.
f2f71bb
to
8e2f0c1
Compare
|
This PR introduces new feature:
cloudflare-worker
, which enables Hrana protocol to be served over Cloudflare workers.