wiggle-generate: paramaterize library on module path to runtime (#1574)
* wiggle-generate: paramaterize library on module path to runtime This change makes no functional difference to users who only use the wiggle crate. Add a parameter to the `Names` constructor that determines the module that runtime components (e.g. GuestPtr, GuestError etc) of wiggle come from. For `wiggle` users this is just `quote!(wiggle)`, but other libraries which consume wiggle-generate may wrap and re-export wiggle under some other path, and not want their consumers to have to know about the wiggle dependency, e.g. `quote!(my_crate::some_path::wiggle)`. * wiggle-generate,macro: move more logic into macro better for code reuse elsewhere
This commit is contained in:
@@ -12,7 +12,6 @@ use syn::{
|
||||
pub struct Config {
|
||||
pub witx: WitxConf,
|
||||
pub ctx: CtxConf,
|
||||
pub emit_metadata: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -60,7 +59,6 @@ impl Config {
|
||||
ctx: ctx
|
||||
.take()
|
||||
.ok_or_else(|| Error::new(err_loc, "`ctx` field required"))?,
|
||||
emit_metadata: false,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user