Skip to content

codegen: emit .js + .d.ts directly, remove SWC dependency, add async cancellation support#20

Merged
qiutongMS merged 2 commits intomainfrom
leilzh/refinetool
Apr 20, 2026
Merged

codegen: emit .js + .d.ts directly, remove SWC dependency, add async cancellation support#20
qiutongMS merged 2 commits intomainfrom
leilzh/refinetool

Conversation

@lei9444
Copy link
Copy Markdown
Contributor

@lei9444 lei9444 commented Apr 20, 2026

Summary

Replace the TypeScript → SWC transpilation pipeline with direct .js + .d.ts emission from Rust. This eliminates the @swc/core
runtime dependency, makes generated output immune to user tsconfig settings, and simplifies the npm package.

Also adds AbortSignal cancellation support for WinRT async operations throughout the stack.

Architecture

Before: metadata → typescript.rs → .ts → @swc/core → .js After: metadata → project.rs (IR) → render_js.rs → .js /
render_dts.rs → .d.ts

New IR layer (projected.rs) cleanly separates projection decisions (naming, type mapping, async detection) from rendering.
The renderers are purely mechanical formatters.

@qiutongMS qiutongMS merged commit 6db4282 into main Apr 20, 2026
5 checks passed
@qiutongMS qiutongMS deleted the leilzh/refinetool branch April 20, 2026 05:22
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.

2 participants