anchor.diff:    let nativeInvocation="((**self.0)."+nname+")("+native_parms+")"
     // we are ready to generate method
     "
  -"+unsafe+"fn "+mname+generics+"("+parameters+") -> "+(rustTypeToString rtype_constraint)+" {
  +"+unsafe+"fn "+mname+generics+"(&self, "+parameters+") -> "+(rustTypeToString rtype_constraint)+" {
   "+constraints+"
   "+locals+"
     let hr=unsafe {
  
positive.code:         match psource with
          |RustParameter (name,rtype) -> [(name,rtype)]
          |RustSelf |RustParameterSizeOf _ | RustSliceLenghtOf _ | RustIIDOf _ | RustConst _ |RustLocalVar _ |RustStructField _ -> []
        ) |> List.map (fun (name, rtype) -> name+" : "+(rustTypeToString rtype))
    let parameters=System.String.Join(", ", rustParms)
    let unsafe=if mannot=MAUnsafe then "unsafe " else ""
    // generate parameter check (array lenghts should be equal if there's just one native parameter for their length)
  
negative.code:         match ty with
          |Typedef(EnumRef(ename)) when ename=name -> ()
          |Typedef(StructRef(sname)) when sname=name -> ()
          |_ -> sb.AppendFormat("pub type {0} = {1};", name, tyToRust ty).AppendLine() |> ignore
      sb.AppendLine() |> ignore
  
    let createFunctions (sb:System.Text.StringBuilder)=
       // TODO: use 
      for KeyValue(name, Function(CFuncDesc(args,rty,cc))) in funcs do
        sb.AppendLine("#[link(name=\"d3d12\")]") |> ignore       
        sb.AppendFormat("extern {3} {{ pub fn {0}({1}) -> {2}; }}",name,((List.map funcArgToRust args) |> String.concat(", ")),(tyToRust rty), (ccToRust cc)).AppendLine() |> ignore
      sb.AppendLine("").AppendLine() |> ignore
  
    let createIIDs (sb:System.Text.StringBuilder)=
      sb.AppendLine("#[link(name=\"dxguid\")]").AppendLine("extern {") |> ignore
      for iid in iids do
        sb.AppendFormat("  pub static {0}: IID;",iid).AppendLine() |> ignore
      sb.AppendLine("}").AppendLine() |> ignore
  
    let sb=new System.Text.StringBuilder()
    sb.AppendLine("// This file is autogenerated.").AppendLine() |> ignore
    sb.AppendLine("#![feature(libc)]") |> ignore
    sb.AppendLine("extern crate libc;").AppendLine("use libc::{GUID,c_void};").AppendLine() |> ignore
    createEnums sb
    createTypes sb
    createStructs sb
  