Skip to content

Replace language-bindings page with per-language section#57

Merged
okdistribute merged 16 commits into
mainfrom
rae/ios-iroh-ffi-setup
Jun 10, 2026
Merged

Replace language-bindings page with per-language section#57
okdistribute merged 16 commits into
mainfrom
rae/ios-iroh-ffi-setup

Conversation

@okdistribute

@okdistribute okdistribute commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Splits the single deployment/other-languages.mdx into a new Languages section with a page per officially-supported language: Rust, Python, Swift, and Kotlin
  • Adds a from-scratch Xcode walkthrough for setting up an iOS + macOS app on iroh-ffi (Swift Package by URL, -framework Network on iOS, App Sandbox entitlements on macOS, Xcode 16 previews workaround) — with placeholders for screenshots under `/images/swift/`
  • Updates `docs.json` to swap the old top-level entry for a Languages group and adds a redirect from the old path

Pages

  • `languages/index.mdx` — overview + comparison table
  • `languages/rust.mdx` — `cargo add iroh` + hello iroh
  • `languages/python.mdx` — pip install + asyncio example, links iroh-ffi/python/main.py
  • `languages/swift.mdx` — full iOS + macOS Xcode walkthrough
  • `languages/kotlin.mdx` — cargo-make bindgen-kotlin flow + Android NDK notes

Test plan

test bindings using the installation steps from scratch

  • swift
  • kotlin
  • python
  • javascript

🤖 Generated with Claude Code

okdistribute and others added 10 commits May 15, 2026 17:56
Splits the single deployment/other-languages.mdx into a Languages
group with one page per officially-supported language: Rust, Python,
Swift, and Kotlin. Each page covers install + a working hello-iroh
snippet and links to the deeper conceptual material.

The Swift page is a from-scratch Xcode walkthrough (project creation,
adding iroh-ffi as a Swift Package, iOS-specific Network.framework
linker flag, macOS sandbox entitlements, the Xcode 16 SwiftUICore
previews workaround) with screenshot placeholders under
/images/swift/.

docs.json: replaces the top-level deployment/other-languages entry
with the new Languages group and adds a redirect from the old path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add per-language API reference stubs (python, swift, kotlin, js)
  mirroring the rust-api page, grouped under an "API References"
  nav entry in docs.json
- Add API-reference cards to each language tutorial page
- Update languages overview: replace community TS link with the
  official iroh-ffi JS binding, add a contact CTA for missing
  languages, drop em dash
- Convert connect-two-endpoints sections (Set up, Receiver,
  Sender, Wiring main, Run it) into 5-language CodeGroups
- Update Kotlin tutorial to use the new Maven Central artifact

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The published computer.iroh:iroh artifact does not ship a
multiplatform build. Flag this in the install section and move
Android / unsupported-host setup into the from-source path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- New languages/javascript.mdx mirroring the other language guides
  (install, hello-iroh, two-peer echo, next-step cards), wired
  into the Languages nav group in docs.json
- Kotlin page reorder: Hello -> Next steps -> Foreground and
  backgrounding -> Building from source (now last). Add Android
  lifecycle guidance section.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Languages overview gains a per-platform support matrix calling
  out which prebuilt binaries each binding ships. Highlights
  macOS x86_64 as a gap (only Rust and Python cover it).
- JavaScript link points at /languages/javascript; platform
  notes column says "Node.js via N-API".
- JavaScript page: Android pulled out from under Linux, macOS
  flagged as no-Intel-build, Linux terminology aligned to
  glibc/musl.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread languages/index.mdx Outdated
Comment thread languages/index.mdx Outdated
Comment thread languages/kotlin.mdx Outdated
Comment thread languages/kotlin.mdx

## Next steps

<Card title="Connect two endpoints" icon="rocket" href="/connect-two-endpoints" horizontal>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Womp womp. Fine to leave for now because we should get this page to exist, but I’d love it if you could file an issue to add native kotlin code to our kotlin QuickStart page

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had pros and cons with adding native mobile app code to documentation that is not run or updated over time. One of those cons is that the mobile ecosystems evolve quickly and we do not have anyone who can ensure that the code continues to work over time.

That being said, perhaps a way to mitigate this is to have an agent on my mac mini that makes sure that the code is working. It could wake up weekly to try it out. It won't be able to fully test the accelerometer code but maybe that's ok as long as it compiles and runs and connects.

I am currently working on finalizing a mobile app demo with two dots (the one I showed you all last month), and now can finally update it to use the public bindings and open source it. This can be used as the basis for the agent doing this testing and then can be told to open a PR on the docs with any updates that are needed to ensure it's compatible with the latest version of android and ios.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have examples & tests in the ffi repo, you can either copy one of those, or add the one you want and add it here, easy enough to flag if it changes, if it is documented

@okdistribute okdistribute Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what i've been working on, it's ready, and I updated the docs here: https://github.com/n0-computer/hello-iroh-ffi

Comment thread languages/swift.mdx
Comment thread languages/rust.mdx Outdated
Comment thread connect-two-endpoints.mdx
okdistribute and others added 2 commits June 10, 2026 10:58
- Rewrite languages/index.mdx intro to lead with available languages rather than calling out Rust/FFI first
- Update Kotlin dependency to rc.1 (rc.0 was never published)
- Remove tracing-subscriber from rust.mdx install snippet since it's unused in the example

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread languages/index.mdx
Comment thread connect-two-endpoints.mdx
okdistribute and others added 2 commits June 10, 2026 12:36
iroh's Rust runtime completes operations on its own threads, which
have no running asyncio loop, so the bindings cannot wake Python
code without being handed the loop explicitly. Explain this in the
tutorial where the line first appears and in the Python language
guide, and add the call to the hello example for consistency.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@okdistribute okdistribute merged commit ecf70b8 into main Jun 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants