-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Very good article.
However it seems to me a little bit odd using the platform specific RawSymbol in the VTableV0 implementation to get around the lifetime checks.
Maybe a better cross platform approach could be dereferencing the Symbol and storing the function pointer as std::boxed::Box.
struct VTableV0 {
free_object: Box<FreeObject>,
get_info: Box<GetInfo>,
set_info: Box<SetInfo>,
}
// ...
let free_object: Symbol<FreeObject> = library.get(b"free_object\0").unwrap();
let free_object = Box::new(*free_object);Apart from that i like your article very much, thanks.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels