Skip to content

Avoid copy between EmitResult and SmooshResult in m-c #559

@arai-a

Description

@arai-a

smoosh crate in m-c is currently copying jsparagus's EmitResult into SmooshResult, for the following reasons:

  • binding needs #[repr(C)], and EmitResult doesn't have it
  • we copy Vec<T> into CVec<T>
    • This can be solved if:
      • Vec<T> can be exposed to C, or
      • We add accessor functions that takes the reference
  • To handle ownership and free it later
  • (not yet in master) Option<T> needs some conversion, or type definition
  • enum variant needs some conversion, or accessor
    • cbindgen can generate accessor

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions