Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the default Binding Generator #53

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

neacsu
Copy link
Contributor

@neacsu neacsu commented Apr 3, 2024

The swift binding generator doesn't seem to take into consideration the uniffi.toml file when generating the configuration. Use the default generator instead, while explicitly specifying swift as targeted language.

This can be tested with a simple uniffi.toml file for Url bindings:

[bindings.swift.custom_types.Url]
# Name of the type in the Swift code
type_name = "URL"
# Modules that need to be imported
imports = ["Foundation"]
# Functions to convert between strings and URLs
into_custom = "URL(string: {})!"
from_custom = "String(describing: {})"

The generated .swift file won't use the URL from swift, but stay back to the default type value implemented in the code (i.e. String)

The swift binding generator doesn't seem to take into consideration the
uniffi.toml file when generating the configuration. Use the default
generator instead, while explicitly specifying swift as targeted
language.
@antoniusnaumann
Copy link
Owner

Thanks, this was an oversight on my end when updating to the new BindingGenerator API.

@antoniusnaumann antoniusnaumann merged commit 06324e0 into antoniusnaumann:main Apr 4, 2024
14 of 15 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.

None yet

2 participants