Skip to content

Conversation

@molpopgen
Copy link
Member

This PR removes the internal ffi module,
which had been used to wrap the low-level C
types.

It is no longer clear that we have a robust
pattern warranting a trait.
So we are removing the internal trait until
such a pattern becomes clear.

The issues are:

  1. Some C types require malloc to be used properly.
    The table collection is the main example here:
    we need to malloc it so that a tree sequence
    can steal its pointer.
  2. Some uses of some C types require uninitialized
    structures.
    This requirement leads to rust code that looks
    sketchy at first glance.
    This PR refactors that code to leave things
    in either a NonNull or a MaybeUninit as long
    as possible.

@molpopgen molpopgen merged commit bd081db into main Aug 1, 2022
@molpopgen molpopgen deleted the remove_ffi_module branch August 1, 2022 19:18
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