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

[WIP][Codegen] Generate Kotlin Multiplatform bindings #3177

Draft
wants to merge 55 commits into
base: master
Choose a base branch
from

Conversation

lamafab
Copy link
Contributor

@lamafab lamafab commented May 23, 2023

NOTE: This is WIP and marked as a draft. Do not merge yet .

About

This is the follow up to the codegen-v2 Swift binding generation (#3122) and generates Kotlin Multiplatform bindings.

Task List

Current progress:

  • (locally) Setup Kotlin Multiplatform env.
  • Remove unnecessary data from manifest.
  • Add all comments/docs from include/ to manifest.
  • Create templates and generate bindings for each platform:
    • androidMain
      • C++ generated
    • commonMain
    • ioMain
      • (2023-05-23) Started working on this
    • jsMain
  • Test all generated bindings, handle edge-cases.

@lamafab lamafab changed the title [WIP][Codegen] Codegen v2 kotlin [WIP][Codegen] Generate Kotlin Multiplatform bindings May 23, 2023
impl From<TypeVariant> for KotlinType {
fn from(value: TypeVariant) -> Self {
let res = match value {
TypeVariant::Void => "Void".to_string(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TypeVariant::Void => "Void".to_string(),
TypeVariant::Void => "Unit".to_string(),

Copy link

@TassyBee TassyBee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants