[package] name = "sugarloaf" version = "0.2.2" authors = ["Raphael Amorim "] edition = "2021" license = "MIT" include = [ "Cargo.toml", "src/**/*.ttf", "src/**/*.otf", "src/**/*.wgsl", "src/**/*.rs" ] description = "Sugarloaf is Rio rendering engine, designed to be multiplatform. It is based on WebGPU, Rust library for Desktops and WebAssembly for Web (JavaScript). This project is created and maintained for Rio terminal purposes but feel free to use it." documentation = "https://docs.rs/crate/sugarloaf/latest" repository = "https://github.com/raphamorim/sugarloaf" [lib] crate-type = ["cdylib", "rlib"] [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] targets = [ "x86_64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-pc-windows-msvc", "wasm32-unknown-unknown", ] [dependencies] wgpu = "23.0.0" bytemuck = { version = "1.17.0", features = [ "derive" ] } tracing = "0.1.40" serde = { version = "1.0.208", features = ["derive"] } twox-hash = { version = "1.6.3", default-features = false } image_rs = { package = "image", version = "0.25.5", default-features = false, features = ["gif", "jpeg", "ico", "png", "pnm", "webp", "bmp"] } unicode-width = "0.2.0" guillotiere = "0.6.2" ordered-float = "4.5.0" rustc-hash = "2.0.0" raw-window-handle = { version = "0.6.2", features = ["std"] } parking_lot = { version = "0.12.3", features = ["nightly", "hardware-lock-elision"] } ab_glyph = "0.2.29" linked-hash-map = "0.5.6" xi-unicode = "0.3.0" approx = "0.5.1" lru = "0.12.5" skrifa = "0.25.0" halfbrown = "0.2.5" num-traits = "0.2.19" yazi = { version = "0.2.0", optional = true } zeno = { version = "0.2.3", optional = true, default-features = false } futures = "0.3.31" librashader-common = "0.6.2" librashader-presets = "0.6.2" librashader-preprocess = "0.6.2" librashader-pack = "0.6.2" librashader-reflect = { version = "0.6.2", features = ["stable", "wgsl"], default-features = false } librashader-runtime = "0.6.2" librashader-cache = "0.6.2" thiserror = "2.0.1" array-concat = "0.5.2" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] crossbeam-channel = "0.5.13" crossbeam-deque = "0.8.5" rayon = "1.10.0" twox-hash = { version = "1.6.3", default-features = false, features = ["std"] } memmap2 = "0.9.3" slotmap = { version = "1.0.7", default-features = false } tinyvec = { version = "1.6.0", features = ["alloc"] } ttf-parser = { version = "0.25.0" } [target.'cfg(all(unix, not(any(target_os = "macos", target_os = "android"))))'.dependencies] fontconfig-parser = { version = "0.5.7", default-features = false } [dev-dependencies] rio-window = "0.2.1" png = "0.17.8" deflate = "1.0.0" criterion = "0.5.1" [features] default = ["scale", "render"] scale = ["yazi", "zeno"] render = ["scale", "zeno/eval"] [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.7" console_log = "0.2.2" js-sys = "0.3.61" wasm-bindgen = "0.2.87" wasm-bindgen-futures = "0.4.34" wasm-bindgen-test = "0.3.42" web-sys = { version = "0.3.61", features = [ "Location", "Document", "Navigator", "Node", "NodeList", "Gpu", "GpuAdapter", "GpuAddressMode", "GpuAutoLayoutMode", "GpuBindGroup", "GpuBindGroupDescriptor", "GpuBindGroupEntry", "GpuBindGroupLayout", "GpuBindGroupLayoutDescriptor", "GpuBindGroupLayoutEntry", "GpuBlendComponent", "GpuBlendFactor", "GpuBlendOperation", "GpuBlendState", "GpuBuffer", "GpuBufferBinding", "GpuBufferBindingLayout", "GpuBufferBindingType", "GpuBufferDescriptor", "GpuCanvasAlphaMode", "GpuCanvasContext", "GpuCanvasConfiguration", "GpuColorDict", "GpuColorTargetState", "GpuCommandBuffer", "GpuCommandBufferDescriptor", "GpuCommandEncoder", "GpuCommandEncoderDescriptor", "GpuCompareFunction", "GpuCompilationInfo", "GpuCompilationMessage", "GpuCompilationMessageType", "GpuComputePassDescriptor", "GpuComputePassEncoder", "GpuComputePipeline", "GpuComputePipelineDescriptor", "GpuCullMode", "GpuDepthStencilState", "GpuDevice", "GpuDeviceDescriptor", "GpuDeviceLostInfo", "GpuDeviceLostReason", "GpuError", "GpuErrorFilter", # "GpuExtent2dDict", Not yet implemented in web_sys "GpuExtent3dDict", "GpuFeatureName", "GpuFilterMode", "GpuFragmentState", "GpuFrontFace", "GpuImageCopyBuffer", "GpuImageCopyExternalImage", "GpuImageCopyTexture", "GpuImageCopyTextureTagged", "GpuImageDataLayout", "GpuIndexFormat", "GpuLoadOp", "gpu_map_mode", "GpuMipmapFilterMode", "GpuMultisampleState", "GpuObjectDescriptorBase", "GpuOrigin2dDict", "GpuOrigin3dDict", "GpuOutOfMemoryError", "GpuPipelineDescriptorBase", "GpuPipelineLayout", "GpuPipelineLayoutDescriptor", "GpuPowerPreference", "GpuPrimitiveState", "GpuPrimitiveTopology", "GpuProgrammableStage", "GpuQuerySet", "GpuQuerySetDescriptor", "GpuQueryType", "GpuQueue", "GpuRenderBundle", "GpuRenderBundleDescriptor", "GpuRenderBundleEncoder", "GpuRenderBundleEncoderDescriptor", "GpuRenderPassColorAttachment", "GpuRenderPassDepthStencilAttachment", "GpuRenderPassDescriptor", "GpuRenderPassEncoder", "GpuRenderPipeline", "GpuRenderPipelineDescriptor", "GpuRequestAdapterOptions", "GpuSampler", "GpuSamplerBindingLayout", "GpuSamplerBindingType", "GpuSamplerDescriptor", "GpuShaderModule", "GpuShaderModuleDescriptor", "GpuStencilFaceState", "GpuStencilOperation", "GpuStorageTextureAccess", "GpuStorageTextureBindingLayout", "GpuStoreOp", "GpuSupportedFeatures", "GpuSupportedLimits", "GpuTexture", "GpuTextureAspect", "GpuTextureBindingLayout", "GpuTextureDescriptor", "GpuTextureDimension", "GpuTextureFormat", "GpuTextureSampleType", "GpuTextureView", "GpuTextureViewDescriptor", "GpuTextureViewDimension", "GpuUncapturedErrorEvent", "GpuUncapturedErrorEventInit", "GpuValidationError", "GpuVertexAttribute", "GpuVertexBufferLayout", "GpuVertexFormat", "GpuVertexState", "GpuVertexStepMode", "HtmlCanvasElement", "OffscreenCanvas", "ImageBitmap", "ImageBitmapRenderingContext", "Window", "WorkerGlobalScope", "WorkerNavigator" ] } [target.'cfg(target_arch = "wasm32")'.dev-dependencies] web-sys = { version = "0.3.61", features = [ "Location", "Blob", "RequestInit", "RequestMode", "Request", "Response", "WebGl2RenderingContext", "CanvasRenderingContext2d" ]}