Skip to content

Specta 2.0.0-rc.24 (rebuilt against main)#15

Merged
johncarmack1984 merged 34 commits into
mainfrom
fltsci/specta-rc24
May 5, 2026
Merged

Specta 2.0.0-rc.24 (rebuilt against main)#15
johncarmack1984 merged 34 commits into
mainfrom
fltsci/specta-rc24

Conversation

@johncarmack1984

Copy link
Copy Markdown

Summary

This PR carries Oscar's specta-rc.24 work (originally in #12 from oscartbeaumont/TauRPC:fltsci/specta-rc24) plus the work needed to land it cleanly against current main. PR #12 stayed CONFLICTING after the bindings/proxy split (#13) merged, and the harness blocks pushing to repos outside the fltsci org so I could not update Oscar's branch directly.

This branch (fltsci/TauRPC:fltsci/specta-rc24) duplicates Oscar's commits, then adds:

  • Fix dprint edition typo: 2025 -> 2024 (eb762f1) -- dprint.json had rustfmt --edition 2025 which is not a valid Rust edition. CI was failing lint:format on every Rust file.
  • Merge origin/main into fltsci/specta-rc24 (d73d81c) -- resolves the bindings/proxy split (feat!: split generated TS output into bindings.ts + proxy.ts #13) on top of the rc.24 work. taurpc/src/export.rs keeps Oscar's new Exporter::from(ts).framework_runtime(...) rc.24 spine and writes the runtime side via a small write_proxy_file helper. bindings.ts gains an export const ARGS_MAP (was inline-only); proxy.ts consumes it.

Verification

  • cargo build -p taurpc: clean
  • cargo build in example/src-tauri: clean
  • pnpm lint (types + js + format): all pass

Original PR

Oscar's #12 stays open for the discussion thread / attribution. Closing #12 is not the intent of this PR. All commits up to 92f58ed2 are Oscar's; the two on top are merge mechanics that needed to happen on a fork I can push to.

apply_phases already validates the phased type graph. The inner unified-mode
validate in generate_function_field re-ran on the pre-phase types and rejected
every command whose type graph contains #[serde(skip_serializing_if = ...)],
which made the exporter unusable for any codebase that uses serde_with::apply.
Resolves the bindings.ts/proxy.ts split (#13) on top of the rc.24 work.
Output is now split across two files using the new Exporter API:
- bindings.ts: types + ARGS_MAP + Router (no npm imports)
- proxy.ts: createTauRPCProxy + InferCommandOutput re-export

Conflicts resolved:
- taurpc/src/export.rs: kept the rc.24 Exporter::from(ts).framework_runtime
  spine; added back write_proxy_file; ARGS_MAP now exports.
- example/src/lib/bindings.ts: dropped the createTauRPCProxy boilerplate
  (lives in the sibling proxy.ts now).
- CHANGELOG.md: dprint format pass.
@johncarmack1984 johncarmack1984 mentioned this pull request May 5, 2026
Verified by running the example: bindings.ts and proxy.ts both regenerate
with the user-supplied `// My header` prefix. Excluded proxy.ts from
dprint just like bindings.ts since it's generator output.

Regenerated example bindings reflect rc.24's phase-specific behavior
(PhaseSpecificRename now splits into _Serialize/_Deserialize variants).
@johncarmack1984 johncarmack1984 merged commit b1bb36d into main May 5, 2026
1 check 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