sharedlib
sharedlib copied to clipboard
Add a test which mutates data in another library
I would have a working test for this. It is an important use-case.
This is currently impossible. If a library exposes some mutable data, mut foo: usize
for instance, it is impossible to modify foo outside of the library without a transmute. I would like to provide an additional data struct DataMut
, which uses *
pointers rather than * const
pointers, eventually. Of course, a mutable reference to the struct would be required to access the data. There is nothing preventing this in the current implementation except that I haven't gotten around to it.