JFLib API reference#
Generated by python tools/gendoc.py from the doc comments of lib -- do not edit by hand; python tools/gendoc.py --check tells whether this file is up to date.
Every crate is #![no_std]. An app depends on ui (which brings gfx, text, plat, base, img_core and the codecs), links one style crate as style and calls ui::run (docs/GUIDE.md). Colours are 0xAARRGGBB, straight alpha in the API, premultiplied (FMT_PARGB) in images. UI sizes are DIP (96 dpi = 100 %), drawing works in pixels. A name in a description such as ui_box_begin or [img_save] is the assembly routine the function was ported from; the algorithm specs in legacy/ASMLIB/docs/modules/*.md describe both versions.
Not listed here: simd (the SSE2 / AVX2 kernel layer, see lib/simd/README.md), the style crates (docs/STYLES.md), plugins (plugins/README.md).
Contents#
- ui -- the immediate-mode UI: runtime, layout, widgets, windows, style contract
App, AppDesc, Ui, run, async tasks · Layout · Context: input, focus, timers, commands, semantics · Keyboard: Tab order, focus groups, panes and windows (F6), splitters (F8) · Widgets · Popups, menus, command table, tooltips · Text boxes and the clipboard · Rich-text and code editors · Lists, scrolling, tabs, expanders · Data views: grid, tree, badges, meters · Shell parts: navigation, command bar, splitter, breadcrumb, wizard steps · Docking: panels at the sides, tab groups, floating tool windows · Charts · Toasts, spinners, progress · Date and time input · Languages · Vector icons · Values and colours · Windows · Chrome: title bar, dialogs, info and status bars · File dialog · Drawing commands · Scripts and the widget dump · Theme · Cursors, drag and drop, clipboard images, dirty regions · Style contract · Stock painters of the data and shell parts · Constants · Key codes · other - agent_core -- transport-independent actions, schema validation, JSON-RPC, MCP and tasks
lib.rs · src/action.rs · src/rpc.rs · src/schema.rs · src/task.rs - agent_io -- explicitly enabled stdio and current-user native agent transports
lib.rs · src/ipc.rs - gfx -- surfaces, the draw context, blend kernels, paths, strokes, masks, gradients
lib.rs · blend.rs · blendmode.rs · dash.rs · flood.rs · gradient.rs · path.rs · panel.rs · pathdata.rs · raster.rs · shapes.rs · straight.rs · stroke.rs · tmask.rs · xform.rs - text -- fonts (SGF1, TrueType, CFF, COLR), glyph cache, text runs
lib.rs · bidi.rs · cff.rs · colr.rs · fallback.rs · font.rs · fontconf.rs · fontdb.rs · glyphcache.rs · lcd.rs · outline.rs · record.rs · rendering.rs · registry.rs · segment.rs · ttf.rs · shaping.rs · var.rs - spell -- spell checking: Hunspell dictionaries, the system's checker, a personal word list
lib.rs · hyphen.rs · speller.rs · token.rs - img_core -- image I/O dispatch, records, metadata, colour, resampling, image operations
lib.rs · bits.rs · checksum.rs · deflate.rs · exif.rs · gzip.rs · icc.rs · icc_bi.rs · icc_cms.rs · icc_xform.rs · inflate.rs · io.rs · meta.rs · mip.rs · ops.rs · quantize.rs · resample.rs · xform.rs · yuv.rs - img_all -- registration of every codec
lib.rs · psd/mod.rs · psd/document.rs - img_png -- PNG
API · modules - img_jpeg -- JPEG
API · modules - img_bmp -- BMP
API - img_gif -- GIF
API - img_tga -- TGA
API - img_tiff -- TIFF
API · modules - img_webp -- WebP
API · modules - img_heif -- HEIF container (HEIC)
API - img_hevc -- HEVC (H.265) intra coding
API · modules - img_av1 -- AV1 intra coding
API · modules - img_avif -- AVIF
API · modules - img_jxl -- JPEG XL
API · modules - img_jxl_enc -- the new JPEG XL writer (linked into codectest, and the module jxlenc that codectest --jxlenc loads)
API · modules - img_jxr -- JPEG XR
API · modules - img_dds -- DDS and BC1..BC7 block compression
API · modules - img_pdn -- paint.net documents (.pdn)
API · modules - img_svg -- SVG images and icons: parsed once, drawn at any size through gfx's paths (the format IMGF_SVG)
lib.rs · doc.rs · render.rs - fx -- effects and adjustments
lib.rs · adj.rs · artistic.rs · enhance.rs · blur.rs · color.rs · conv.rs · distort.rs · hist.rs · lochist.rs · lut.rs · noise.rs · object.rs · perlin.rs · photo.rs · render.rs · stylize.rs · warp.rs - gpu -- the GPU layer: adapters, devices, buffers, textures, pipelines, command lists, timestamps, swapchains (Vulkan, Metal, WebGPU)
lib.rs · vk_cmd.rs · vk_dev.rs · vk_inst.rs · vk_res.rs · vk_swap.rs · vk_dmabuf.rs · web_cmd.rs · web_dev.rs · web_res.rs · web_swap.rs · mtl_cmd.rs (Apple) · mtl_dev.rs (Apple) · mtl_res.rs (Apple) · mtl_swap.rs (Apple) - render3d -- the core of the 3D engine: meshes, textured materials, scenes of instances (mirrored ones too), visibility on the GPU, glTF scenes on the GPU
lib.rs · dfg.rs · env.rs · gltf.rs · math.rs · particles.rs · post.rs · scene.rs · shadow.rs · texture.rs - render2d -- the core of the 2D renderer for CAD: a retained scene of lines, polylines, arcs and circles, curves, fills and hatches with layers and styles, dash patterns, blocks inserted many times, transparency, text from an atlas of multi-channel distance fields, strokes with analytic coverage, f64 coordinates relative to the camera, visibility on the GPU
lib.rs · curve.rs · dxf.rs · fill.rs · math.rs · msdf.rs · scene.rs · hl.rs · overlay.rs · pick.rs · cpu.rs · text.rs - gltf -- glTF 2.0 import (.gltf, .glb): meshes, materials, textures, decoded images, nodes in f64, without a GPU
lib.rs · write.rs - shader -- SPIR-V: module builder, disassembler, validator, std140 / std430 layouts, the benchmark shaders
lib.rs · bench.rs · dis.rs · layout.rs · module.rs · msl.rs · parse.rs · reflect.rs · samples.rs · spv.rs · val.rs - wgsl -- the WGSL compiler: lexer, parser, semantic checker, constant evaluation, the typed IR, the SPIR-V back end, pipeline constants and checks, the benchmark shaders as WGSL
lib.rs · ast.rs · bench.rs · check.rs · ir.rs · lex.rs · parse.rs · pipeline.rs · print.rs · spirv.rs · xid.rs - plat -- the platform layer: windows, input, files, threads, network, processes, desktop services
lib.rs · process.rs · process_win.rs (Windows) · process_linux.rs (Linux) · process_apple.rs (Apple) · process_android.rs · sync.rs · net.rs · web_net.rs · fs.rs · service.rs · watch.rs · certs.rs · rand.rs · pid.rs · hosted.rs · cpu.rs · capabilities.rs · policy.rs · sandbox.rs · boot.rs · vfs.rs · content.rs · secret.rs · instance.rs · spell.rs · tray.rs · sysmenu.rs · power.rs · apple_power_ios.rs · scan.rs · share.rs · win_share.rs (Windows) · sensors.rs · autostart.rs · pkg.rs · linux_flatpak.rs (Linux) · taskbar.rs · assoc.rs · recent.rs · audio.rs · win_audio.rs (Windows) · linux_audio.rs (Linux) · screen.rs · hotkey.rs · present_copy.rs · log.rs · a11y.rs · a11y_wire.rs · settings.rs · locale.rs · guarded.rs · dirs.rs · control_stream.rs · control_ipc_win.rs (Windows) · control_ipc_linux.rs (Linux) · control_ipc_apple.rs (Apple) · pool.rs · task.rs · aio.rs · win.rs (Windows) · win_api.rs (Windows) · win_clip.rs (Windows) · win_filedlg.rs (Windows) · win_pen.rs (Windows) · win_touch.rs (Windows) · win_popup.rs (Windows) · win_gpuout.rs (Windows) · win_plock.rs (Windows) · win_shell.rs (Windows) · win_test.rs (Windows) · win_inst.rs (Windows) · win_screen.rs (Windows) · win_hotkey.rs (Windows) · win_uia.rs (Windows) · win_dnd.rs (Windows) · win_sys.rs (Windows) · win_thread.rs (Windows) · win_print.rs (Windows) · win_lib.rs (Windows) · win_pad.rs (Windows) · win_clr.rs (Windows) · linux.rs (Linux) · linux_disp.rs (Linux) · linux_wl.rs (Linux) · linux_xkb.rs (Linux) · linux_x11.rs (Linux) · linux_portal.rs (Linux) · linux_ibus.rs (Linux) · linux_life.rs (Linux) · linux_pad.rs (Linux) · linux_sys.rs (Linux) · linux_thread.rs (Linux) · linux_print.rs (Linux) · linux_elfload.rs (Linux) · linux_glibc.rs (Linux) · linux_gpuout.rs (Linux) · apple.rs (Apple) · apple_sys.rs (Apple) · apple_thread.rs (Apple) · apple_disp.rs (Apple) · apple_ios_services.rs (Apple) · apple_ios_share.rs (Apple) · apple_ios_a11y.rs (Apple) · apple_ios_pad.rs (Apple) · apple_mac.rs (Apple) · apple_mac_test.rs (Apple) · apple_mac_dnd.rs (Apple) · apple_mac_app.rs (Apple) · apple_mac_pad.rs (Apple) · apple_mac_gpu.rs (Apple) · apple_mac_scan.rs (Apple) · apple_mac_screen.rs (Apple) · apple_mac_share.rs (Apple) · apple_mac_a11y.rs (Apple) · web.rs · android_files.rs · web_files.rs · android_host.rs · web_windows.rs · web_screen.rs · web_system.rs · web_sensors.rs · android_gpu.rs · apple_ios_gpu.rs · web_gpu.rs · android_ime.rs · android_edges.rs · web_threads.rs · android_thread.rs · android_print.rs · clipdrop.rs · fuzz.rs · dnd.rs · cliprich.rs · consts.rs · evq.rs · keycode.rs · plock.rs · pad.rs · ime.rs · icc.rs · pwin0.rs · plib.rs · print.rs · modhost.rs · modabi.rs - base -- UTF-8, command line, settings files, numbers and text
lib.rs · ini.rs · num.rs · settings.rs · rng.rs · metrics.rs · cmdtree.rs · hashring.rs · lru.rs · pattern.rs - formats -- bounded JSON with exact numbers, typed JSON records, an XML subset, the text encodings of the web
src/charsets.rs · src/decode.rs · src/encoding.rs · src/jmap.rs · src/json.rs · src/multibyte.rs · src/xml/mod.rs · src/xml/lenient.rs · src/xml/reader.rs - datetime -- timestamps, civil dates, RFC 3339, IANA time zones with DST, cron schedules
lib.rs · cron.rs · tz.rs - crypto -- hashes, MACs, KDFs, Argon2id, AEAD, X25519, Ed25519, sealed boxes (no randomness inside)
lib.rs · aead.rs · aes.rs · argon2.rs · b64.rs · blake2b.rs · blake3.rs · bn.rs · chacha.rs · ecdsa.rs · ed25519.rs · ed448.rs · gcm.rs · hmac.rs · p256.rs · p384.rs · poly1305.rs · rsa.rs · sealbox.rs · sha2.rs · sha3.rs · x25519.rs · sha1.rs · keywrap.rs · cmac.rs · md5.rs · mlkem.rs · eappwd.rs - x509 -- X.509 certificates: strict parsing, path validation with name constraints, a private Ed25519 CA's builder, the DER reader and writer (netio::x509 and netpkt::x509 are this crate)
lib.rs · csr.rs · der.rs · ip.rs · key.rs · ocsp.rs - compress -- DEFLATE, zlib, gzip, Brotli, LZ4, Zstandard, CRC-32, Adler-32 and xxHash, codec ids
lib.rs · brotli/mod.rs · brotli/enc.rs · brotli/sdec.rs · brotli/senc.rs · checksum.rs · deflate/mod.rs · deflate/dec.rs · deflate/enc.rs · deflate/sdec.rs · gzip.rs · lz4.rs · stream.rs · xxh.rs · zlib.rs · zstd/mod.rs · zstd/dec.rs · zstd/dict.rs · zstd/enc.rs · zstd/sdec.rs · zstd/senc.rs - datastore -- an embedded journal database: JSON collections, transactions, snapshots, crash recovery, secondary indexes, encryption at rest
lib.rs · index.rs · journal.rs - netio -- HTTP/1.1 server and client, TLS 1.3 subset, X.509 of a private CA, SSH-2, DNS
lib.rs · acme.rs · client.rs · dane.rs · dns/mod.rs · dns/resolver.rs · dns/secure.rs · http.rs · ocsp.rs · pem.rs · proxy.rs · roots.rs · server.rs · smtp.rs · ssh.rs · tls/mod.rs · tls/conn.rs · tls/keysched.rs · tls/kx.rs · tls/record.rs · tls/session.rs · tls/staple.rs · trust.rs · url.rs · ws.rs - netpkt -- network packets byte for byte: addresses, checksums, Ethernet to TCP codecs, DHCP, DNS, NTP, syslog, SNMP, SSH, TLS 1.3, EAP and IMAP without I/O, X.509, cookies, URI references, a dissector, pcapng
lib.rs · addr.rs · arp.rs · checksum.rs · decode.rs · dhcp.rs · dns.rs · dnssec.rs · eth.rs · icmp.rs · ipv4.rs · ipv6.rs · ntp.rs · pcapng.rs · pkt.rs · syslog.rs · tcp.rs · udp.rs · http.rs · stp.rs · rip.rs · nat.rs · icmpv6.rs · ospf.rs · addrsel.rs · eapol.rs · bgp.rs · tftp.rs · ftp.rs · smtp.rs · pop3.rs · imf.rs · ber.rs · snmp.rs · mib.rs · telnet.rs · radius.rs · uri.rs · ssh.rs · snmpv3.rs · eap.rs · imap.rs · cookie.rs · psl.rs · x509.rs · tls.rs - eapm -- EAP-MD5 and EAP-PWD as peer and server state machines without I/O
lib.rs - cas -- content-addressed backup repositories: chunking, packs, signed encrypted snapshots, GC
lib.rs · chunker.rs · pack.rs · snapshot.rs · store.rs - update -- signed app updates: check, download, apply at the next start, health marker, rollback
lib.rs · appimage.rs · apply.rs · fetch.rs · manifest.rs - archive -- bounded ZIP32 containers (stored and DEFLATE)
lib.rs · cfb.rs · opc.rs - doc_core -- structured documents, sources, citations and undo/redo
lib.rs · citation.rs · format.rs · tabs.rs · tables.rs · table_grid.rs · table_tree.rs · table_position.rs · table_styles.rs · cell_borders.rs · character.rs · formula/mod.rs · styles.rs · fragment.rs · table_fragment.rs · notes.rs · paragraph_edit.rs · text_range.rs · story_range.rs · search.rs · source.rs · source_audit.rs · source_import.rs · source_library.rs · source_merge.rs - doc_layout -- typographic paragraph flow and page layout
lib.rs · table_fit.rs · table_borders.rs - doc_view -- shared document fonts, page painting, thumbnails and page coordinates
lib.rs · src/coords.rs · src/fonts.rs · src/measure.rs · src/page.rs · src/cell_border_editor.rs · src/table.rs · src/table_editor.rs · src/formula_editor.rs · src/table_style_editor.rs · src/table_position_editor.rs · src/ruler.rs · src/ruler_input.rs · src/tab_editor.rs - doc_io -- conservative DOCX interchange and bounded file I/O
lib.rs · bibliography.rs · bibtex.rs · clipboard.rs · html_import.rs · fragment.rs · exchange.rs · library.rs · preservation.rs · preserved_text.rs · ris.rs · preserved_stories.rs - diagram_core -- the diagram model: ShapeSheet cells, formulas, geometry, routing and layout
src/autoconn.rs · src/cell.rs · src/data.rs · src/datagraphic.rs · src/datagraphic/legend.rs · src/design/mod.rs · src/design/apply.rs · src/design/catalog.rs · src/dock.rs · src/document.rs · src/edit.rs · src/field.rs · src/formula/color.rs · src/formula/engine.rs · src/formula/eval.rs · src/formula/math.rs · src/formula/parse.rs · src/formula/theme.rs · src/formula/val.rs · src/formula/xml.rs · src/geometry.rs · src/glue.rs · src/groups.rs · src/hit.rs · src/inherit.rs · src/instance.rs · src/instance/detach.rs · src/jumps.rs · src/layout.rs · src/layout/adjust.rs · src/names.rs · src/ops.rs · src/ops/arcs.rs · src/ops/clip.rs · src/ops/draw.rs · src/ops/picture.rs · src/ops/points.rs · src/page.rs · src/pagesetup.rs · src/pointglue.rs · src/render/mod.rs · src/render/index.rs · src/render/rebuild.rs · src/render/style.rs · src/render/text.rs · src/render/theme.rs · src/replace.rs · src/report.rs · src/report/run.rs · src/report/shape.rs · src/route.rs · src/route_edit.rs · src/route_styles.rs · src/shapeops.rs · src/shapeops/frame.rs · src/shape.rs · src/structure.rs · src/structure/cff.rs · src/structure/edge.rs · src/structure/rel.rs · src/sheet.rs · src/strings.rs · src/tools.rs · src/tools/array.rs · src/tools/dimension.rs · src/tools/number.rs · src/units.rs · src/views.rs - diagram_io -- Visio file formats (the VSDX family) and diagram exports
src/blank.rs · src/data.rs · src/props.rs · src/report.rs · src/stencil.rs · src/template.rs · src/textdraw.rs · src/vdx/mod.rs · src/vss/mod.rs · src/vsdx.rs · src/windows.rs · src/xml.rs - rt -- the runtime parts apps use: SSE / x87 float semantics, CPU features, locks, crash records
lib.rs · boot.rs · cpu.rs · crash.rs · fx.rs · kernel.rs · sync.rs · x87.rs · portable/fx.rs · portable/math.rs · hosted.rs - pdf -- PDF writer (vector pages, font subsets, links, outlines) and reader (encryption, text, outlines, forms, attachments, drawing pages)
lib.rs · src/canvas.rs · src/edit/mod.rs · src/edit/form.rs · src/edit/full.rs · src/encrypt.rs · src/font.rs · src/form.rs · src/geom.rs · src/image.rs · src/read/mod.rs · src/read/content.rs · src/read/nav.rs · src/read/object.rs · src/read/render/mod.rs · src/read/render/shade.rs · src/read/text.rs · src/shading.rs - diagram_view -- draws diagram pages (the display list of diagram_core) on render2d and gfx
src/export/mod.rs · src/export/pdf.rs · src/export/raster.rs · src/export/svg.rs · src/fonts.rs · src/image.rs · src/measure.rs · src/view.rs - dxf -- DXF import (ASCII): tables, blocks and entities of model space, without a GPU
lib.rs · src/fonts.rs · src/mtext.rs · src/strings.rs - physics -- Collision, deterministic queries and rigid bodies with joints for games
src/bvh.rs · src/character.rs · src/gjk.rs · src/hull.rs · src/joint.rs · src/mass.rs · src/math.rs · src/mesh.rs · src/query.rs · src/shape.rs · src/sim.rs · src/tree.rs · src/world.rs - game -- The game core: a world of entities and components, a fixed tick, input actions, cameras
lib.rs · src/assets.rs · src/audio.rs · src/camera.rs · src/input.rs · src/net/arena.rs · src/net/bits.rs · src/net/bot.rs · src/net/client.rs · src/net/clock.rs · src/net/event.rs · src/net/input.rs · src/net/lagcomp.rs · src/net/link.rs · src/net/predict.rs · src/net/proto.rs · src/net/quant.rs · src/net/room.rs · src/net/server.rs · src/net/sim.rs · src/net/snapshot.rs · src/net/walker.rs · src/pose.rs · src/sparse.rs · src/tick.rs · src/world.rs - game_render3d -- The bridge from the game core to render3d: entities with a mesh as scene instances
lib.rs · src/models.rs - geom -- Deterministic modelling kernel: meshes from primitives, profiles and operations, with checks
lib.rs · src/build.rs · src/check.rs · src/csg.rs · src/exact.rs · src/math.rs · src/mesh.rs · src/normals.rs · src/poly.rs · src/region.rs - netchan -- Message channels for games: UDP with sequence numbers and acks, WebSocket, the browser's network
lib.rs · src/client.rs · src/conn.rs · src/endpoint.rs · src/packet.rs · src/reliable.rs · src/seal.rs · src/server.rs · src/ws.rs - sheet_io -- XLSX and CSV import: workbooks and delimited text as typed tables
lib.rs · src/csv.rs · src/xlsx.rs · src/xlsx_write.rs - img_jp2 -- JPEG 2000 decoder
lib.rs - img_jbig2 -- JBIG2 decoder
lib.rs - cidmap -- a JFLib library crate
lib.rs