You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My crate needs to generate the docs.rs documentation despite the fairly involved compilation with the native bindings, which cannot easily happen inside the docsrs docker constraints.
If my cxx bridge includes some header files and types, would it be possible to somehow generate special shims for the native stuff, possibly with a custom attribute, to let cxx simplify the docsrs generation?
#[cxx::bridge(namespace = "mln::bridge")]pubmod ffi {// This should be part of the docs#[repr(u32)]#[derive(Debug,Clone,Copy,PartialEq,Eq)]enumMapMode{Continuous,Static,Tile,}unsafeextern"C++"{// include! requires git clone of a large library, downloads, etc,// and should be avoided in docsrs#[cfg(not(docsrs))]// <-- this should skip including external file, while passing all the other partsinclude!("map_renderer.h");// This is an error in docsrs because the type is defined in the header file// It needs some fake shim insteadtypeMapRenderer;fnMapRenderer_new(mapMode:MapMode) -> UniquePtr<MapRenderer>;}}
The text was updated successfully, but these errors were encountered:
My crate needs to generate the docs.rs documentation despite the fairly involved compilation with the native bindings, which cannot easily happen inside the docsrs docker constraints.
If my cxx bridge includes some header files and types, would it be possible to somehow generate special shims for the native stuff, possibly with a custom attribute, to let cxx simplify the docsrs generation?
The text was updated successfully, but these errors were encountered: