OctoBase
OctoBase copied to clipboard
Swift Demo not compiled
Hi, how do you guys fix this the error please? I am using the latest code from the master.
apps/swift/octobase-demo/octobase_demoApp.swift#L26C1-L27C1
class JwstWorkspace: ObservableObject {
var workspace: Workspace
init (workspace: String) {
// Not compiled , even changing it to Workspace(ptr: workspace.intoRustString())
self.workspace = Workspace(workspace)
}
}
Error
OctoBase/apps/swift/octobase-demo/octobase_demoApp.swift:26:36 Cannot convert value of type 'String' to expected argument type 'UnsafeMutableRawPointer'
Hello! Thank you for filing an issue. If this is a bug report, please include relevant logs to help us debug the problem.
Must add following to Workspace ffi.
extern "Rust" {
type Workspace;
#[swift_bridge(init)]
fn new(id: String) -> Workspace;
}