Open jsantell opened 1 year ago
An ergonomic challenge here is that you still need to yield a ns_noosphere_t *
to the FFI caller so that they can initialize additional spheres (or their first one) or create keys. So, you can't away from that pointer existing for APIs that work at a level above spheres.
And, if we roll it into the sphere, it would be nice to do it in a way that doesn't leave an orphaned pointer in the case that they "free" a ns_noosphere_t
but still have an ns_sphere_t
hanging around.
An ergonomic challenge here is that you still need to yield a
ns_noosphere_t *
to the FFI caller so that they can initialize additional spheres (or their first one) or create keys. So, you can't away from that pointer existing for APIs that work at a level above spheres.And, if we roll it into the sphere, it would be nice to do it in a way that doesn't leave an orphaned pointer in the case that they "free" a
ns_noosphere_t
but still have anns_sphere_t
hanging around.
Great points! Also worth clarifying that this issue isn't a suggestion, but an observation of a potential API simplification. Multispheres and multithreads could present challenges not presently worth the effort.
_Originally posted by @jsantell in https://github.com/subconsciousnetwork/noosphere/pull/271#discussion_r1134375356_