WIP: Bindings #1706

Draft
crodas wants to merge 5 commits from crodas/feature/bindings into main
crodas commented 2026-03-06 04:59:23 +00:00 (Migrated from github.com)

Description

Prototype to have a monorepo for all the bindings


Notes to the reviewers


Suggested CHANGELOG Updates

CHANGED

ADDED

REMOVED

FIXED


Checklist

### Description Prototype to have a monorepo for all the bindings ----- ### Notes to the reviewers <!-- In this section you can include notes directed to the reviewers, like explaining why some parts of the PR were done in a specific way --> ----- ### Suggested [CHANGELOG](https://github.com/cashubtc/cdk/blob/main/CHANGELOG.md) Updates <!-- Please do not edit the actual changelog but note what you changed here. --> #### CHANGED #### ADDED #### REMOVED #### FIXED ---- ### Checklist * [ ] I followed the [code style guidelines](https://github.com/cashubtc/cdk/blob/main/CODE_STYLE.md) * [ ] I ran `just final-check` before committing
thesimplekid (Migrated from github.com) reviewed 2026-03-06 08:33:20 +00:00
thesimplekid (Migrated from github.com) left a comment

Nice. I think this is generally in the right direction though I didn't try to run anything.

Nice. I think this is generally in the right direction though I didn't try to run anything.
@ -0,0 +13,4 @@
integration layers where Rust code can be adapted to the conventions and native
capabilities of each platform or language runtime.
[1]: https://gitlab.com/ark-bitcoin/bark-ffi-bindings
thesimplekid (Migrated from github.com) commented 2026-03-06 08:17:27 +00:00

Should make this more what it is and how to use it and when we need to modify it. We can credit bark at the end of the readme.

Should make this more what it is and how to use it and when we need to modify it. We can credit bark at the end of the readme.
@ -0,0 +1,31 @@
[package]
thesimplekid (Migrated from github.com) commented 2026-03-06 08:30:33 +00:00

We should pick a tag, looks like payjoin is using v0.1.0+v0.30.0, do we need main. If so whatever commit is working for us.

We should pick a tag, looks like payjoin is using v0.1.0+v0.30.0, do we need main. If so whatever commit is working for us.
@ -0,0 +1,126 @@
//! Build script
thesimplekid (Migrated from github.com) commented 2026-03-06 08:28:24 +00:00

Can we just add a little more detail on why we need to patch and if it might change in the future as I understand this is required but it could be fragile, so to save us some time debugging in the future. Also if we could track what we need in order to avoid patching to get the upstream that would be great.

Can we just add a little more detail on why we need to patch and if it might change in the future as I understand this is required but it could be fragile, so to save us some time debugging in the future. Also if we could track what we need in order to avoid patching to get the upstream that would be great.
@ -0,0 +1,254 @@
#!/bin/bash
thesimplekid (Migrated from github.com) commented 2026-03-06 08:01:38 +00:00

We need to define this in a nix and not use rustup

We need to define this in a nix and not use rustup
thesimplekid (Migrated from github.com) commented 2026-03-06 08:15:52 +00:00

Should define this in a flake and not use rustup

Should define this in a flake and not use rustup
@ -28,7 +28,7 @@ serde = { workspace = true, features = ["derive", "rc"] }
serde_json = { workspace = true }
thesimplekid (Migrated from github.com) commented 2026-03-06 08:06:41 +00:00

Can this be a workspace dep, we use it in multiple places?

Can this be a workspace dep, we use it in multiple places?
@ -1908,6 +1908,38 @@ pub enum WalletDbBackend {
},
thesimplekid (Migrated from github.com) commented 2026-03-06 08:25:30 +00:00

We use the enum because of a uniffi limitation of being able to use a trait directly, I'm guessing? Can we just add a comment explaining that?

Should we add some constructors on the enum, new_sqlite(path), new_psgl(url) for example? Think that would be easier for downstream to use.

We use the enum because of a uniffi limitation of being able to use a trait directly, I'm guessing? Can we just add a comment explaining that? Should we add some constructors on the enum, new_sqlite(path), new_psgl(url) for example? Think that would be easier for downstream to use.
crodas (Migrated from github.com) reviewed 2026-03-06 14:48:15 +00:00
@ -1908,6 +1908,38 @@ pub enum WalletDbBackend {
},
crodas (Migrated from github.com) commented 2026-03-06 14:48:15 +00:00

We use the enum because of a uniffi limitation of being able to use a trait directly, I'm guessing? Can we just add a comment explaining that?

Yeah, I'll expand on that. But that is the reason

> We use the enum because of a uniffi limitation of being able to use a trait directly, I'm guessing? Can we just add a comment explaining that? Yeah, I'll expand on that. But that is the reason
thesimplekid commented 2026-03-11 11:57:05 +00:00 (Migrated from github.com)

I notice the flake.lock is not changed after adding the dart overlay. This could be what is causing the rate limiting as this needs to be updated. nix flake lock should be run and the new lock file committed.

I notice the flake.lock is not changed after adding the dart overlay. This could be what is causing the rate limiting as this needs to be updated. `nix flake lock` should be run and the new lock file committed.
thesimplekid (Migrated from github.com) reviewed 2026-03-11 14:28:14 +00:00
crodas (Migrated from github.com) reviewed 2026-03-11 15:15:32 +00:00
crodas (Migrated from github.com) reviewed 2026-03-11 15:16:20 +00:00
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin crodas/feature/bindings:crodas/feature/bindings
git switch crodas/feature/bindings

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff crodas/feature/bindings
git switch crodas/feature/bindings
git rebase main
git switch main
git merge --ff-only crodas/feature/bindings
git switch crodas/feature/bindings
git rebase main
git switch main
git merge --no-ff crodas/feature/bindings
git switch main
git merge --squash crodas/feature/bindings
git switch main
git merge --ff-only crodas/feature/bindings
git switch main
git merge crodas/feature/bindings
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cashubtc/cdk!1706
No description provided.