core

module
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2024 License: BSD-3-Clause

README

Cogent Core Logo
Cogent Core Name Banner

Go Report Card pkg.go.dev docs GitHub Actions Workflow Status Test Coverage Version

Cogent Core is a free and open source framework for building powerful, fast, and elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and the Web with a single pure Go codebase, allowing you to Code Once, Run Everywhere. See the Cogent Core Website for more information, including extensive documentation and interactive running examples. The website itself is a Cogent Core app running on the web using wasm.

NOTE: Cogent Core is currently undergoing a period of significant development to make it easier to make powerful, fast, and elegant apps. As such, some of the information in this repository and on the Cogent Core website may be incorrect. Furthermore, there are ongoing breaking changes, so starting new apps with this framework is not recommended at this time; if you do, please be ready to adjust to any breaking changes. We are planning to make a v1 stable release in early June (see the v1 milestone).

Directories

Path Synopsis
Package base contains a collection of base infrastructure packages that serve as a base for the main Cogent Core packages.
Package base contains a collection of base infrastructure packages that serve as a base for the main Cogent Core packages.
atomctr
Package atomctr implements basic atomic int64 counter
Package atomctr implements basic atomic int64 counter
auth
Package auth provides a system for identifying and authenticating users through third party cloud systems in Cogent Core apps.
Package auth provides a system for identifying and authenticating users through third party cloud systems in Cogent Core apps.
bools
Package bools provides functions and interfaces for interacting with bool values.
Package bools provides functions and interfaces for interacting with bool values.
datasize
Package datasize provides a data size type and constants.
Package datasize provides a data size type and constants.
dirs
Package dirs provides various utility functions in dealing with directories such as a list of all the files with a given (set of) extensions and finding paths within the Go source directory (GOPATH, etc)
Package dirs provides various utility functions in dealing with directories such as a list of all the files with a given (set of) extensions and finding paths within the Go source directory (GOPATH, etc)
elide
Package elide provides basic text eliding functions.
Package elide provides basic text eliding functions.
errors
Package errors provides a set of error handling helpers, extending the standard library errors package.
Package errors provides a set of error handling helpers, extending the standard library errors package.
exec
Package exec provides an easy way to execute commands, improving the ease-of-use and error handling of the standard library os/exec package.
Package exec provides an easy way to execute commands, improving the ease-of-use and error handling of the standard library os/exec package.
fileinfo
Package fileinfo manages file information and categorizes file types; it is the single, consolidated place where file info, mimetypes, and filetypes are managed in Cogent Core.
Package fileinfo manages file information and categorizes file types; it is the single, consolidated place where file info, mimetypes, and filetypes are managed in Cogent Core.
fileinfo/mimedata
Package mimedata defines MIME data support used in clipboard and drag-and-drop functions in the Cogent Core GUI.
Package mimedata defines MIME data support used in clipboard and drag-and-drop functions in the Cogent Core GUI.
generate
Package generate provides utilities for building code generators in Go.
Package generate provides utilities for building code generators in Go.
indent
Package indent provides trivial indentation generation methods: Tabs, Spaces, and Indent with a selector.
Package indent provides trivial indentation generation methods: Tabs, Spaces, and Indent with a selector.
iox
Package iox provides boilerplate wrapper functions for the Go standard io functions to Read, Open, Write, and Save, with implementations for commonly used encoding formats.
Package iox provides boilerplate wrapper functions for the Go standard io functions to Read, Open, Write, and Save, with implementations for commonly used encoding formats.
logx
Package logx implements structured log handling and provides global log and print verbosity and color options.
Package logx implements structured log handling and provides global log and print verbosity and color options.
mergefs
Package mergefs provides support for merging multiple filesystems together.
Package mergefs provides support for merging multiple filesystems together.
mpi
Package mpi wraps the Message Passing Interface for distributed memory data sharing across a collection of processors (procs).
Package mpi wraps the Message Passing Interface for distributed memory data sharing across a collection of processors (procs).
nptime
Package nptime provides a non-pointer version of the time.Time struct that does not have the location pointer information that time.Time has, which is more efficient from a memory management perspective, in cases where you have a lot of time values being kept: https://segment.com/blog/allocation-efficiency-in-high-performance-go-services/
Package nptime provides a non-pointer version of the time.Time struct that does not have the location pointer information that time.Time has, which is more efficient from a memory management perspective, in cases where you have a lot of time values being kept: https://segment.com/blog/allocation-efficiency-in-high-performance-go-services/
num
option
Package option provides optional (nullable) types.
Package option provides optional (nullable) types.
ordmap
package ordmap implements an ordered map that retains the order of items added to a slice, while also providing fast key-based map lookup of items, using the Go 1.18 generics system.
package ordmap implements an ordered map that retains the order of items added to a slice, while also providing fast key-based map lookup of items, using the Go 1.18 generics system.
profile
Package profile provides basic but effective profiling of targeted functions or code sections, which can often be more informative than generic cpu profiling.
Package profile provides basic but effective profiling of targeted functions or code sections, which can often be more informative than generic cpu profiling.
randx
Package randx provides randomization functionality built on top of standard math/rand random number generation functions.
Package randx provides randomization functionality built on top of standard math/rand random number generation functions.
randx/distsplot
Command distsplot plots histograms of random distributions
Command distsplot plots histograms of random distributions
reflectx
Package reflectx provides a collection of helpers for the reflect package in the Go standard library.
Package reflectx provides a collection of helpers for the reflect package in the Go standard library.
runes
Package runes provides a small subset of functions that are found in strings, bytes standard packages, for rune slices.
Package runes provides a small subset of functions that are found in strings, bytes standard packages, for rune slices.
strcase
Package strcase provides functions for manipulating the case of strings (CamelCase, kebab-case, snake_case, Sentence case, etc).
Package strcase provides functions for manipulating the case of strings (CamelCase, kebab-case, snake_case, Sentence case, etc).
timer
Package timer provides a simple wall-clock duration timer based on standard time.
Package timer provides a simple wall-clock duration timer based on standard time.
tolassert
Package tolassert provides functions for asserting the equality of numbers with tolerance (in other words, it checks whether numbers are about equal).
Package tolassert provides functions for asserting the equality of numbers with tolerance (in other words, it checks whether numbers are about equal).
vcs
Package vcs provides a more complete version control system (ex: git) interface, building on https://github.com/Masterminds/vcs.
Package vcs provides a more complete version control system (ex: git) interface, building on https://github.com/Masterminds/vcs.
cli
Package cli generates powerful CLIs from Go struct types and functions.
Package cli generates powerful CLIs from Go struct types and functions.
cliview
Package cliview extends package cli by generating GUIs.
Package cliview extends package cli by generating GUIs.
cmd
core
Command core provides command line tools for developing apps and libraries using the Cogent Core framework.
Command core provides command line tools for developing apps and libraries using the Cogent Core framework.
core/cmd
Package cmd provides utilities for managing apps and packages that use the Cogent Core framework.
Package cmd provides utilities for managing apps and packages that use the Cogent Core framework.
core/config
Package config contains the configuration structs for the Cogent Core tool.
Package config contains the configuration structs for the Cogent Core tool.
core/generate
Package generate provides the generation of useful methods, variables, and constants for Cogent Core code.
Package generate provides the generation of useful methods, variables, and constants for Cogent Core code.
core/mobile
Gomobile is a tool for building and running mobile apps written in Go.
Gomobile is a tool for building and running mobile apps written in Go.
core/mobile/binres
Package binres implements encoding and decoding of android binary resources.
Package binres implements encoding and decoding of android binary resources.
core/mobile/sdkpath
Package sdkpath provides functions for locating the Android SDK.
Package sdkpath provides functions for locating the Android SDK.
Package colors provides named colors, utilities for manipulating colors, and Material Design 3 color schemes, palettes, and keys in Go.
Package colors provides named colors, utilities for manipulating colors, and Material Design 3 color schemes, palettes, and keys in Go.
gradient
Package gradient provides linear, radial, and conic color gradients.
Package gradient provides linear, radial, and conic color gradients.
matcolor
Package matcolor provides support for creating Material Design 3 color schemes and palettes.
Package matcolor provides support for creating Material Design 3 color schemes and palettes.
Package core provides the core GUI functionality of Cogent Core.
Package core provides the core GUI functionality of Cogent Core.
Package cursors provides Go constant names for cursors as SVG files.
Package cursors provides Go constant names for cursors as SVG files.
cursorimg
Package cursorimg provides the cached rendering of SVG cursors to images.
Package cursorimg provides the cached rendering of SVG cursors to images.
Command docs provides documentation of Cogent Core, hosted at https://cogentcore.org/core.
Command docs provides documentation of Cogent Core, hosted at https://cogentcore.org/core.
Package enums provides common interfaces for enums and bit flag enums and utilities for using them
Package enums provides common interfaces for enums and bit flag enums and utilities for using them
cmd/enumgen
Package main provides the actual command line implementation of the enumgen library.
Package main provides the actual command line implementation of the enumgen library.
enumgen
Package enumgen provides functions for generating enum methods for enum types.
Package enumgen provides functions for generating enum methods for enum types.
key
Package key defines an event for physical keyboard keys, for the Cogent Core GUI system.
Package key defines an event for physical keyboard keys, for the Cogent Core GUI system.
examples
async
Command async demonstrates async updating in Cogent Core.
Command async demonstrates async updating in Cogent Core.
svg
xyz
Package htmlview converts HTML and MD into Cogent Core widget trees.
Package htmlview converts HTML and MD into Cogent Core widget trees.
Package icons provides Go constant names for Material Design Symbols as SVG files.
Package icons provides Go constant names for Material Design Symbols as SVG files.
Package keymap implements maps from keyboard shortcuts to semantic GUI keyboard functions.
Package keymap implements maps from keyboard shortcuts to semantic GUI keyboard functions.
math32 is our version of the G3N math32 32-bit, 3D rendering-based math library.
math32 is our version of the G3N math32 32-bit, 3D rendering-based math library.
minmax
Package minmax provides a struct that holds Min and Max values.
Package minmax provides a struct that holds Min and Max values.
vecint
Package vecint has vector types for emergent, including Vector2i which is a 2D vector with int values, using the API based on math32.Vector2i.
Package vecint has vector types for emergent, including Vector2i which is a 2D vector with int values, using the API based on math32.Vector2i.
Package pages provides an easy way to make content-focused sites consisting of Markdown, HTML, and Cogent Core pages.
Package pages provides an easy way to make content-focused sites consisting of Markdown, HTML, and Cogent Core pages.
wpath
Package wpath handles pages paths.
Package wpath handles pages paths.
Package paint is the rendering package for Cogent Core.
Package paint is the rendering package for Cogent Core.
scan
Package scan provides an anti-aliasing 2-D rasterizer, which is based on the larger Freetype suite of font-related packages, but the raster package is not specific to font rasterization, and can be used standalone without any other Freetype package.
Package scan provides an anti-aliasing 2-D rasterizer, which is based on the larger Freetype suite of font-related packages, but the raster package is not specific to font rasterization, and can be used standalone without any other Freetype package.
Package parse is the top-level package for the Cogent Core parsing system.
Package parse is the top-level package for the Cogent Core parsing system.
lexer
Package lexer provides all the lexing functions that transform text into lexical tokens, using token types defined in the token package.
Package lexer provides all the lexing functions that transform text into lexical tokens, using token types defined in the token package.
lsp
Package lsp contains types for the Language Server Protocol LSP: https://microsoft.github.io/language-server-protocol/specification and mappings from these elements into the token.Tokens types which are used internally in parse.
Package lsp contains types for the Language Server Protocol LSP: https://microsoft.github.io/language-server-protocol/specification and mappings from these elements into the token.Tokens types which are used internally in parse.
parser
Package parse does the parsing stage after lexing
Package parse does the parsing stage after lexing
suplangs
Package suplangs includes all the supported languages for parse -- need to import this package to get those all included in a given target
Package suplangs includes all the supported languages for parse -- need to import this package to get those all included in a given target
syms
Package syms defines the symbols and their properties that are accumulated from a parsed file, and are then used for e.g., completion lookup, etc.
Package syms defines the symbols and their properties that are accumulated from a parsed file, and are then used for e.g., completion lookup, etc.
token
Package token defines a complete set of all lexical tokens for any kind of language! It is based on the alecthomas/chroma / pygments lexical tokens plus all the more detailed tokens needed for actually parsing languages
Package token defines a complete set of all lexical tokens for any kind of language! It is based on the alecthomas/chroma / pygments lexical tokens plus all the more detailed tokens needed for actually parsing languages
plots
Package plots defines a variety of standard Plotters for the plot package.
Package plots defines a variety of standard Plotters for the plot package.
Package shell provides the Cogent Shell (cosh), which combines the best parts of Go and bash to provide an integrated shell experience that allows you to easily run terminal commands while using Go for complicated logic.
Package shell provides the Cogent Shell (cosh), which combines the best parts of Go and bash to provide an integrated shell experience that allows you to easily run terminal commands while using Go for complicated logic.
cmd/cosh
Command cosh is an interactive cli for running and compiling Cogent Shell (cosh).
Command cosh is an interactive cli for running and compiling Cogent Shell (cosh).
Package spell provides functions for spell check and correction.
Package spell provides functions for spell check and correction.
Package styles contains the style structures for the Cogent Core GUI framework.
Package styles contains the style structures for the Cogent Core GUI framework.
units
Package Units supports full range of CSS-style length units (em, px, dp, etc)
Package Units supports full range of CSS-style length units (em, px, dp, etc)
svg
Package svg provides SVG rendering classes, I/O parsing: full SVG rendering
Package svg provides SVG rendering classes, I/O parsing: full SVG rendering
Package system provides a Go operating system interface framework to support events, window management, and other OS-specific functionality needed for full GUI support.
Package system provides a Go operating system interface framework to support events, window management, and other OS-specific functionality needed for full GUI support.
driver/base
Package base provides base driver types that platform-specific drivers can extend to implement interfaces defined in package system.
Package base provides base driver types that platform-specific drivers can extend to implement interfaces defined in package system.
driver/mobile/mobileinit
Package mobileinit contains common initialization logic for mobile platforms that is relevant to both all-Go apps and gobind-based apps.
Package mobileinit contains common initialization logic for mobile platforms that is relevant to both all-Go apps and gobind-based apps.
driver/offscreen
Package offscreen provides placeholder implementations of system interfaces to allow for offscreen testing and capturing of apps.
Package offscreen provides placeholder implementations of system interfaces to allow for offscreen testing and capturing of apps.
driver/web
Package web implements system interfaces on the web through WASM
Package web implements system interfaces on the web through WASM
driver/web/jsfs
Package jsfs provides a Node.js style filesystem API in Go that can be used to allow os functions to work on wasm.
Package jsfs provides a Node.js style filesystem API in Go that can be used to allow os functions to work on wasm.
bitslice
Package bitslice implements a simple slice-of-bits using a []byte slice for storage, which is used for efficient storage of boolean data, such as projection connectivity patterns.
Package bitslice implements a simple slice-of-bits using a []byte slice for storage, which is used for efficient storage of boolean data, such as projection connectivity patterns.
stats/metric
Package metric provides various similarity / distance metrics for comparing floating-point vectors.
Package metric provides various similarity / distance metrics for comparing floating-point vectors.
stats/norm
Package norm provides normalization and norm metric computations e.g., L2 = sqrt of sum of squares of a vector.
Package norm provides normalization and norm metric computations e.g., L2 = sqrt of sum of squares of a vector.
stats/pca
Package pca performs principal component's analysis and associated covariance matrix computations, operating on table.Table or tensor.Tensor data.
Package pca performs principal component's analysis and associated covariance matrix computations, operating on table.Table or tensor.Tensor data.
stats/simat
Package simat provides similarity / distance matrix functions that create a SimMat matrix from Tensor or Table data.
Package simat provides similarity / distance matrix functions that create a SimMat matrix from Tensor or Table data.
stats/split
Package split provides GroupBy, Agg, Permute and other functions that create and populate Splits of table.Table data.
Package split provides GroupBy, Agg, Permute and other functions that create and populate Splits of table.Table data.
stats/stats
Package agg provides aggregation functions operating on IndexView indexed views of table.Table data, along with standard AggFunc functions that can be used at any level of aggregation from tensor on up.
Package agg provides aggregation functions operating on IndexView indexed views of table.Table data, along with standard AggFunc functions that can be used at any level of aggregation from tensor on up.
tensormpi
Package tensormpi wraps the Message Passing Interface for distributed memory data sharing across a collection of processors (procs).
Package tensormpi wraps the Message Passing Interface for distributed memory data sharing across a collection of processors (procs).
tensorview
Package tensorview provides GUI Views of table Table and Tensor structures using the Cogent Core Views framework.
Package tensorview provides GUI Views of table Table and Tensor structures using the Cogent Core Views framework.
difflib
Package difflib is a partial port of Python difflib module.
Package difflib is a partial port of Python difflib module.
difflib/bytes
Package bytes is a partial port of Python difflib module for bytes.
Package bytes is a partial port of Python difflib module for bytes.
histyle
Package histyle provides syntax highlighting styles; it is based on github.com/alecthomas/chroma, which in turn was based on the python pygments package.
Package histyle provides syntax highlighting styles; it is based on github.com/alecthomas/chroma, which in turn was based on the python pygments package.
Package tree provides a powerful and extensible tree system, centered on the core Node interface.
Package tree provides a powerful and extensible tree system, centered on the core Node interface.
Package types provides type information for Go types, methods, and functions.
Package types provides type information for Go types, methods, and functions.
cmd/typegen
Command typgen provides the generation of type information for Go types, methods, and functions.
Command typgen provides the generation of type information for Go types, methods, and functions.
typegen
Package typgen provides the generation of type information for Go types, methods, and functions.
Package typgen provides the generation of type information for Go types, methods, and functions.
Package undo package provides a generic undo / redo functionality based on `[]string` representations of any kind of state representation (typically JSON dump of the 'document' state).
Package undo package provides a generic undo / redo functionality based on `[]string` representations of any kind of state representation (typically JSON dump of the 'document' state).
Package vgpu implements a convenient interface to the Vulkan GPU-based graphics and compute framework, in Go, using the https://github.com/goki/vulkan Go bindings.
Package vgpu implements a convenient interface to the Vulkan GPU-based graphics and compute framework, in Go, using the https://github.com/goki/vulkan Go bindings.
gosl
gosl translates Go source code into HLSL compatible shader code.
gosl translates Go source code into HLSL compatible shader code.
gosl/alignsl
package alignsl performs 16-byte alignment checking of struct fields and total size modulus checking of struct types to ensure HLSL (and GSL) compatibility.
package alignsl performs 16-byte alignment checking of struct fields and total size modulus checking of struct types to ensure HLSL (and GSL) compatibility.
gosl/examples/basic
This example just does some basic calculations on data structures and reports the time difference between the CPU and GPU.
This example just does some basic calculations on data structures and reports the time difference between the CPU and GPU.
gosl/slbool
package slbool defines a HLSL friendly int32 Bool type.
package slbool defines a HLSL friendly int32 Bool type.
gosl/slprint
Package printer implements printing of AST nodes.
Package printer implements printing of AST nodes.
vkinit
package vkinit handles loading and initialization of Vulkan without any dependency upon glfw
package vkinit handles loading and initialization of Vulkan without any dependency upon glfw
vshape
vshape provides a library of 3D shapes, built from indexed triangle meshes, which can be added together in `ShapeGroup` lists.
vshape provides a library of 3D shapes, built from indexed triangle meshes, which can be added together in `ShapeGroup` lists.
Package video implements a video player widget in Cogent Core.
Package video implements a video player widget in Cogent Core.
Package views allows you to view and edit Go data in the GUI using reflection.
Package views allows you to view and edit Go data in the GUI using reflection.
xyz
Package xyz is a 3D graphics framework written in Go.
Package xyz is a 3D graphics framework written in Go.
io/obj
Package obj is used to parse the Wavefront OBJ file format (*.obj), including associated materials (*.mtl).
Package obj is used to parse the Wavefront OBJ file format (*.obj), including associated materials (*.mtl).
xyzview
Package xyzview provides a GUI view for a 3D xyz scene.
Package xyzview provides a GUI view for a 3D xyz scene.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL