---
source: boltffi_bindgen/src/render/swift/templates.rs
expression: "render_function(&func, \"boltffi\")"
---
public func greet(name: String) -> String {
    var name = name
    return name.withUTF8 { nameBuf in
        let buf = boltffi_greet(nameBuf.baseAddress!, UInt(nameBuf.count))
        defer { boltffi_free_buf(buf) }
        return boltffiDecodeOwnedBuf(buf.ptr, Int(buf.len)) { reader in reader.readString() }
    }
}
