Revision control
Copy as Markdown
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
import Foundation
#if canImport(MozillaRustComponents)
import MozillaRustComponents
#endif
/// The public interface to viaduct.
///
/// This is a singleton, and should be used via the
/// `shared` static member.
public class Viaduct {
/// The singleton instance of Viaduct
/// FIXME: FXIOS-13501 Unprotected shared mutable state is an error in Swift 6
public nonisolated(unsafe) static let shared = Viaduct()
private init() {}
public func initialize(userAgent: String) {
setGlobalDefaultUserAgent(userAgent: userAgent)
viaductInitBackendRust()
}
}