Repository navigation
Commit b6f601d
feat: update to 1.0.0-rc.1 (#236)
* wip: start transition to 0.93
* chore: add normalized formatting
* feat!: refactor to 1.0 API
* ci: run on feat-1-0 + properly build/test kotlin and swift
- add feat-1-0 to push triggers (run CI without a PR) + workflow_dispatch
- swift: test-swift now assembles a self-contained macOS-only xcframework
into IrohLib/artifacts (gitignored/absent on fresh checkout); full
iOS+macOS xcframework build job + swift build smoke check
- make_swift.sh: mkdir IrohLib/artifacts before copy; honor CARGO_TARGET_DIR
- kotlin: Android cross-build job (cargo-ndk, 4 ABIs) + new kotlin-android
cargo-make task, alongside the JVM gradle test job
- js CI: enable corepack so yarn is on PATH
- ci_js: use non-lts napi-rs docker images (current Rust, edition 2024)
- Swatinem/rust-cache on heavy native jobs
* test: add custom-preset tests in every binding
Rust struct / Python subclass / JS function / Kotlin class / Swift
protocol conformance, each implementing the Preset trait and binding
an endpoint through it.
* ci: build aarch64 linux with apt cross-gcc
napi-cross's bundled gcc fails to assemble ring's armv8 .S. Install
gcc-aarch64-linux-gnu and point CC/CXX/linker at it for the aarch64
gnu+musl targets while keeping napi-cross for the sysroot.
* feat(services): use crates.io iroh-services + add tests in every binding
- depend on published iroh-services =1.0.0-rc.0 instead of the git branch
- rename ServicesClient::new -> create (uniffi-python can't do async
'new' constructors; named async classmethods work, like Endpoint.bind)
- add services tests in Rust/Python/JS/Kotlin/Swift: a well-formed fake
api secret boots the client (lazy connection, no network), and the
credential validation (none / two / malformed) is exercised
* fix(ci): build full xcframework for swift tests
The hand-rolled single-slice macOS-only framework xcframework was not
resolved by `swift test` on the CI runner (every C symbol "not in scope"
because the `Iroh` clang module was silently dropped), while the proven
multi-slice framework xcframework built by `make_swift.sh` passes there.
Point `test-swift` at the full `swift-xcframework` build and collapse the
two Swift CI jobs into one (full build + test). Drop the now-unused,
trap-prone `bindgen-swift-macos` task.
* fix(ci-js): build aarch64-musl with zig
napi-cross has no aarch64-musl toolchain and napi sets
LINKER=aarch64-linux-musl-gcc, which the apt gnu cross-gcc does not
provide — the link step failed with "linker not found". Switch this
target to cargo-zigbuild (`--zig`), the napi-rs-documented path for
musl cross builds, which supplies a correct musl linker/libc.
* refactor(swift): single root Package.swift
Collapse the duplicated root + IrohLib/ manifests into one root manifest
whose Iroh binaryTarget is env-switched: the pinned GitHub-release zip by
default (consumers / Swift Package Index), or the locally built
Iroh.xcframework when IROH_LOCAL_XCFRAMEWORK is set (dev / CI).
This removes the silent drift between the two manifests — notably the
shipped manifest was iOS-only and missing the SystemConfiguration /
CoreWLAN linker settings, so the macOS slice did not link for consumers.
The corrected platform list, linker settings and test target now live in
exactly one place. test-swift runs at the repo root with the env set;
make_swift.sh no longer needs the IrohLib/artifacts copy.
* fix(ci-js): cross-compile aarch64-musl via zig shim
napi-rs CLI 3.x has no --zig flag (Unknown Syntax Error). Drive the
cross build through env instead: a tiny zig `cc -target
aarch64-linux-musl` shim used as CC/CXX/linker, so the plain `cargo
build` napi invokes cross-compiles with zig's bundled musl libc and
assembler (also fixes ring's armv8 asm). No napi CLI flag or external
musl toolchain mirror needed.
* fix(swift): presence-based local xcframework selection
Selecting the local xcframework via an env var only worked for
swift test / CI; a GUI Xcode consumer pointing at a local checkout got
the pinned remote release zip instead, then failed to compile the fresh
1.0-rc binding against the stale binary.
Switch on the presence of the gitignored built marker
(Iroh.xcframework/macos-arm64/Iroh.framework/Iroh), resolved via
#filePath so it is CWD-independent. A built source checkout (local dev,
CI, an app pointing at a local clone) gets the local xcframework; a
fresh git-URL / Swift Package Index consumer falls through to the
release zip. IROH_FORCE_REMOTE_XCFRAMEWORK forces the zip. Validated
against the ios-motion-demo consumer.
* chore(swift): resync tracked xcframework headers to 1.0-rc
The committed xcframework-skeleton uniffi headers were a stale snapshot
predating the ServicesClient::create rename. Regenerate them from the
current API so the tracked skeleton matches the 1.0-rc surface.
* fix(ci-js): strip Rust target triple in zig shim
cc-rs appends --target=aarch64-unknown-linux-musl (the Rust triple) to
the C compiler invocation; zig cc cannot parse it
("UnknownOperatingSystem") and the ring build failed. Filter any
--target=* arg out of the shim before forcing zig's own
-target aarch64-linux-musl.
* fix(ci): run Swift tests via xcodebuild
`swift test` (SwiftPM CLI) cannot form the `Iroh` clang module from the
framework-bundle xcframework on the CI runner — every uniffi type
("RustBuffer", etc.) resolves as "not in scope" — while full Xcode
consumes the same xcframework correctly (proven by the iOS demo and the
prior swift build smoke). Drive the suite through `xcodebuild test`
(scheme IrohLib, macOS arm64) so local and CI use the working toolchain.
* fix(ci-js): build x86_64-musl with the zig shim
x86_64-musl still used --use-napi-cross, whose host gcc produced a
glibc-linked .node (test failed: needs ld-linux-x86-64.so.2 in the musl
container). Switch it to the same zig-shim used by aarch64-musl, which
on the prior run produced a static-musl binary that passed both build
and the musl test job. Unifies both musl targets on zig.
* fix(ci): target macOS for xcodebuild test + link Network.framework
Two issues surfaced once xcodebuild started forming the Iroh module:
- `-destination 'platform=macOS,arch=arm64'` matched nothing on the
older CI Xcode, so it fell back to an iOS simulator. Use the portable
canonical `platform=macOS` (no arch), which resolves to the Mac on
every Xcode version.
- iroh's netdev references Network.framework (nw_* / nw_path_monitor_*);
the IrohLib target only linked SystemConfiguration + CoreWLAN, so the
link failed. Link Network.framework (needed by iOS consumers too).
Validated locally: xcodebuild test -scheme IrohLib -destination
'platform=macOS' builds for macOS and passes all 16 tests.
* fix(ci): hermetic xcodebuild derived data for Swift tests
The self-hosted CI runner reuses the shared DerivedData across runs, so
xcodebuild relinked a stale extracted Iroh.framework from an earlier run
(undefined uniffi_iroh_ffi_checksum_* symbols) instead of the freshly
built xcframework. Run xcodebuild test with a clean repo-local
-derivedDataPath so each run re-extracts the just-built xcframework.
Validated locally: 16/16 tests pass via the exact CI invocation.
* fix(ci): force native arm64 for Swift xcodebuild test
The xcframework macOS slice is arm64-only, but the self-hosted runner
(hetz-ci-mac-aarch64-1 — arm64 hardware) runs its Actions agent under
Rosetta, so an unwrapped xcodebuild built x86_64 and failed to link the
arm64 Iroh binary (every uniffi_* symbol undefined). Wrap the xcodebuild
invocations in `arch -arm64` so the test build is native arm64
regardless of the agent's process arch (a no-op on a native runner).
Log `uname -m` to confirm host arch.
Validated locally: TEST SUCCEEDED, 16/16.
* fix: swift builds & ci parallelism (#234)
* feat(docs): self-hosted multi-language docs site + SPI manifest
Phase 7. Self-host the API reference for all four bindings on GitHub
Pages, with Swift additionally on the Swift Package Index:
- Swift: xcodebuild docbuild + DocC static-hosting transform
(make_swift_docs.sh), plus .spi.yml for the SPI mirror
- JS: TypeDoc over the napi index.d.ts
- Kotlin: Dokka v2 (dokkaGeneratePublicationHtml)
- Python: pdoc over iroh.iroh_ffi
- Landing: gen_landing.py renders site/index.html from
support-matrix.yaml (matrix + per-language links)
Unified under cargo-make (docs-* + docs-site aggregate) and
deployed by .github/workflows/docs.yml on tag push or manual
dispatch via actions/deploy-pages.
* ci(docs): temporary feat-1-0 push trigger to validate the pipeline
Revert before merging to main; docs deploy should stay tag/dispatch-only.
* fix(ci-docs): pin setup-python to arm64 (Rosetta runner / maturin wheel ABI)
* perf(ci-docs): parallelize docs into per-language jobs + macOS-only Swift slice
Fan out Swift (macOS) / Python / JS / Kotlin / landing into independent
jobs, assemble artifacts, then deploy — total time ~= slowest job, not
the sum. Swift now builds only the macOS-arm64 framework slice (DocC
never consumes the 3 iOS slices), cutting its Rust build from ~13min to
~3min. Python/JS/Kotlin move to Linux runners (also sidesteps the
Rosetta wheel-ABI issue).
* fix(ci-docs): tar-wrap Swift DocC artifact (upload-artifact rejects ':' filenames)
* chore(ci): move to self hosted runners (#235)
* chore(ci-docs): move to self-hosted runners + adopt PR #235 patterns
Mirror PR #235 in docs.yml: all runners now [self-hosted, macOS, ARM64]
or [self-hosted, linux, X64], Swatinem/rust-cache on every Rust-compiling
job, and corepack enable on the JS job (self-hosted runners don't ship
yarn).
* fix(ci-js): force linux/amd64 for x86_64 test-bindings docker runs
The self-hosted [linux,X64] runner also services arm64 binding-test
jobs; `node:N-slim` in its Docker image cache may already be the
arm64 variant of the multi-arch manifest. Without --platform, Docker
reuses the cached variant and process.arch ends up reporting arm64,
so napi-rs loads the wrong native binding ("Cannot find module
@number0/iroh-linux-arm64-gnu"). The arm64/armv7 jobs already pass
--platform explicitly; add the same to the two x86_64 jobs.
* chore(ci): drop feat-1-0 from push branches; PR #236 handles it via pull_request
With PR #236 open, every push to feat-1-0 fired both `push` and
`pull_request` events. The concurrency group cancels one of the two,
but it still churns the queue and wastes scheduler cycles on the
already-contended self-hosted runners. Trigger feat-1-0 via PR only;
keep main + tags on push so release/post-merge still fire.
* chore(ci-js): drop x86_64-apple-darwin (not shipped, removes Rosetta flake)
PR #235 already dropped macOS x86_64 from release.yml — we no longer
ship that binary. The CI JS build/test matrix and universal-apple-darwin
job were testing a target we don't publish, and the test-bindings step
under Rosetta on the arm64 mac runner segfaults intermittently (yarn
under Rosetta'd node@20). Remove the build/test matrix entries, the
universal-macOS job, and the universal-apple-darwin napi target.
* chore(ci): split monolithic ci.yml into per-language workflows
Mirrors the existing ci_js.yml pattern — each language gets its own
workflow file with the same triggers (workflow_dispatch + pull_request +
merge_group + push:main) and concurrency group:
ci.yml rust matrix + fmt/clippy/docs (Rust core)
ci_python.yml python build & test
ci_swift.yml full xcframework build & test
ci_kotlin.yml JVM test matrix + Android cross-build
ci_js.yml (existing) napi multi-target + tests, plus the
cargo-make test-js macOS smoke test ("native-test")
absorbed from ci.yml's `js` job
Behavior is unchanged: jobs are copied verbatim with their original
runners, steps, and timeouts.
* feat(release): prepare-release mechanism + PyPI trusted publishing
Phase 6, step 1+2. Two things land together because they share the same
"manifest is self-consistent at every commit; CI never writes to main"
constraint.
scripts/release/bump_version.py — rewrites Cargo.toml [package].version,
iroh-js/package.json version, and Package.swift releaseTag / releaseChecksum
in surgical text edits.
scripts/release/zip_xcframework.sh — produces a deterministic, byte-identical
zip of Iroh.xcframework (fixed mtimes, sorted entries, zip -X). Verified
locally: identical SHA-256 across runs.
cargo make prepare-release <VERSION> — chains the above with cargo make
swift-xcframework + Cargo.lock + yarn.lock refresh into a single local
command that produces the release commit (macOS-only; needs Xcode).
release.yml build-and-publish-swift now uses the same zip script so the
SHA-256 it uploads matches what prepare-release baked into Package.swift.
wheels.yml gains a publish job that downloads all wheel artifacts and pushes
them to PyPI via pypa/gh-action-pypi-publish (Trusted Publishing / OIDC,
id-token: write — no long-lived token). Gated on push: tags: v*.
RELEASING.md documents the 5-step release procedure + the why behind the
local-only prepare model (matches firebase-ios-sdk / Sentry-Cocoa
convention for binary SwiftPM packages).
* feat(kotlin): expose Android JNI context init via IrohAndroid (#237)
* fix(kotlin): add Android stubs as compileOnly so JVM build resolves Context
IrohAndroid.kt (PR #237) imports android.content.Context — that symbol
isn't on the JVM classpath, so compileKotlin failed for the JVM library.
The Android stubs jar is a compile-time-only dep: the published JAR
doesn't ship it, Android apps get the real Context at runtime, and JVM
consumers (who never call IrohAndroid) ignore the unloaded class.
* fix(kotlin): defer uniffi android codegen until Android-library multi-module split
PR #237 flipped `android = true` in uniffi.toml, which makes uniffi-kotlin
inject `androidx.annotation.RequiresApi` and `Build.VERSION_CODES.UPSIDE_DOWN_CAKE`
(API 34) into the generated iroh_ffi.kt. Those references don't resolve
under the pure JVM `java-library` plugin — supporting them properly
requires kotlin/lib to be split into a JVM module + a com.android.library
AAR module. PR #237's actual feature (IrohAndroid.installAndroidContext
+ the Rust JNI glue in src/android_init.rs) works without the uniffi flag.
* refactor: address PR #236 review feedback
Two unrelated comments from okdistribute on PR #236, batched because
they're both small surface changes touching tests + a demo file.
- rename EndpointTicket::new -> EndpointTicket::from_addr and
EndpointTicket::parse -> EndpointTicket::from_string so the uniffi
side matches the JS binding (which already exposes fromAddr /
fromString) and so the two constructors are clearly distinguished
by name rather than positional. All 4 binding test suites updated.
- python/main.py: drop client/server framing for peer-to-peer wording
(subcommand 'serve' -> 'accept'; 'server received'/'client received'
prints -> 'echo side'/'dial side'). Docstring rewritten accordingly.
* refactor: hex helper, signed counters, EndpointTicket error test (PR #236)
* fix(keys): export Eq+Hash for EndpointId/Signature, drop .equal() (PR #236)
* fix(keys): JS isEqual -> equals; EndpointAddr exports Eq+Hash, drops .equal() (PR #236)
* style: rustfmt close() let-binding
* style: derive PartialEq on EndpointId (clippy: derived Hash + manual PartialEq)
* feat(kotlin-maven): vanniktech publish plugin + computer.iroh coordinates
* feat(kotlin-maven): real publish job — cross-build cdylibs + gradle Central publish
* feat(release): cargo make pre-release-check (local dry-run before tagging)
* fix(kotlin-maven): Vanniktech 0.34 publishToMavenCentral API (no SonatypeHost arg)
* fix(release): pre-release-check provisions maturin venv; never skip steps
* fix(release): pre-release-check writes wheel to explicit --out (custom CARGO_TARGET_DIR)
* fix(release): reference rsop key file, not gpg, for local signing dry-run
* deps: bump iroh to 1.0.0-rc.1, iroh-services to 1.0.0-rc.2
* feat(path): expose local_addr on PathEvent::{Opened,Closed,Selected}
* chore(iroh-js): sync npm sub-packages + optionalDependencies to 0.35.0
* chore(bindgen): regenerate kotlin + js bindings for PathEvent.local_addr
* ci(docs): drop temp feat-1-0 push trigger (tag/dispatch only)
* docs(readme): describe 1.0 surface, Maven Central, docs site, cargo-make
---------
Co-authored-by: Asmir Avdicevic <asmir.avdicevic64@gmail.com>
Co-authored-by: rae <633012+okdistribute@users.noreply.github.com>1 parent c96e428 commit b6f601d
127 files changed
Lines changed: 29211 additions & 63705 deletions
File tree
- .github/workflows
- Iroh.xcframework
- ios-arm64_x86_64-simulator/Iroh.framework/Headers
- ios-arm64/Iroh.framework/Headers
- macos-arm64/Iroh.framework/Headers
- IrohLib
- Sources/IrohLib
- Tests/IrohLibTests
- iroh-js
- npm
- android-arm-eabi
- android-arm64
- darwin-arm64
- linux-arm-gnueabihf
- linux-arm-musleabihf
- linux-arm64-gnu
- linux-arm64-musl
- linux-x64-gnu
- linux-x64-musl
- win32-arm64-msvc
- win32-x64-msvc
- src
- test
- kotlin
- gradle
- wrapper
- lib
- src
- main/kotlin/computer/iroh
- test/kotlin/computer/iroh
- python
- scripts
- docs
- release
- src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
| 7 | + | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
11 | | - | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
18 | | - | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | | - | |
| 25 | + | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
26 | | - | |
27 | 30 | | |
28 | 31 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 34 | + | |
38 | 35 | | |
39 | | - | |
40 | 36 | | |
41 | | - | |
42 | 37 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
71 | 49 | | |
| 50 | + | |
72 | 51 | | |
73 | 52 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
0 commit comments