Skip to content

Conversation

@amireh
Copy link

@amireh amireh commented Dec 23, 2025

this patch introduces a new feature - "export-bindings" - to grant downstream more control over when the bindings are generated.

With the feature disabled in Cargo.toml, the bindings are not exported automatically on every test run. The user can choose when to export by explicitly enabling the feature with the --features cargo test flag.

For example, in my Cargo.toml:

[dependencies]
ts-rs = { version = "11", default-features = false, features = [
  "serde-compat",
  "no-serde-warnings",
] }

And at the time I need to export the bindings:

cargo test --features export-bindings -- 'export_bindings_'

This is somewhat related to #62 and #253.

Checklist

  • I have followed the steps listed in the Contributing guide.
  • If necessary, I have added documentation related to the changes made.
  • I have added or updated the tests related to the changes made.

this patch introduces a new feature - "export-bindings" - to grant
downstream more control over when the bindings are generated.

With the feature disabled in Cargo.toml, the bindings are not exported
automatically on every test run. The user can choose when to export by
explicitly enabling the feature with the --features cargo test flag.

For example, in my Cargo.toml:

```toml
[dependencies]
ts-rs = { version = "11", default-features = false, features = [
  "serde-compat",
  "no-serde-warnings",
] }
```

And at the time I need to export the bindings:

    cargo test --features export-bindings -- 'export_bindings_'

This is somewhat related to Aleph-Alpha#62 and Aleph-Alpha#253.
@gustavo-shigueo
Copy link
Collaborator

Hey @amireh, thanks for the PR! We are already working on something like this in #400, along with a CLI to simplify the cargo test command

@amireh
Copy link
Author

amireh commented Dec 26, 2025

Hi @gustavo-shigueo , thank you for the comment. I'll close this then and continue to use my fork until it becomes available.

Thank you for the great tool.

@amireh amireh closed this Dec 26, 2025
@gustavo-shigueo gustavo-shigueo mentioned this pull request Dec 26, 2025
14 tasks
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