mirror of
https://github.com/luxfi/dex.git
synced 2026-09-24 00:26:31 +00:00
Clean architecture following Go principles: - factory.go: Pure Go implementation (default, no CGO) - factory_cgo.go: C++ optimized version when CGO=1 - orderbook.go: Standalone Go orderbook implementation - cpp_orderbook.go: C++ bindings for high performance Also includes: - Vault execution integration with orderbook - dex-api-server command for REST/WebSocket API - E2E test scripts for API validation - Documentation site scaffolding
19 lines
446 B
TypeScript
19 lines
446 B
TypeScript
import { docs } from "@/.source"
|
|
import { loader } from "fumadocs-core/source"
|
|
|
|
// Create a single source instance that is reused
|
|
// This prevents circular references and stack overflow issues
|
|
let _source: ReturnType<typeof loader> | null = null
|
|
|
|
export function getSource() {
|
|
if (!_source) {
|
|
_source = loader({
|
|
baseUrl: "/docs",
|
|
source: docs.toFumadocsSource(),
|
|
})
|
|
}
|
|
return _source
|
|
}
|
|
|
|
export const source = getSource()
|