egui/egui/Cargo.toml
ilya sheprut 186362a4b8
Arbitrary data in Memory using Any, fix #255 (#257)
* init work

* implement deferred deserialization

* many improvements
* rename `DataElement` -> `AnyMapElement`
* make `data` in `Memory` as public field of type with public interface
* make interface more rich
* transform most unwraps to proper error handling
* make `AnyMap` store by `TypeId`, so now individual type can be counted and reset

* improve storing TypeId between different rust versions

* rewrite system widgets to use AnyMap

* refactor everything
* replace `serde_json` -> `ron`
* move `any_map` to module
* separate `AnyMap` into `AnyMapId` and `serializable::AnyMapId` in order to not require `serde` traits in methods
* add `AnyMap` and `serializable::AnyMap` that stores elements just by type, without `Id`
* write documentation
* change tooltips and color picker to use `Memory::data_temp`

* fix bugs and docs

* Apply suggestions from code review

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>

* rename `AnyMap` → `TypeMap`

* rename `AnyMapId` → `AnyMap`, add generic <Key> to it

* rename files `id_map` → `any_map`

* move out usages from `serializable` mod

* rename `ToDeserialize` → `Serialized`

* fix bug with counting

* add tests, and...
* rename `reset` → `remove`
* add function `remove_by_type`
* format code

* improve code
* make identical interface for serialized and simple maps
* make serialized maps serialized fully, without features by moving this into `Memory` struct with `#[cfg(feature = "persistence")]` under fields
* move `serialized::TypeId` into `AnyMapElement` struct

* fix pipeline and add one more test

* update docs

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2021-04-12 21:53:32 +02:00

41 lines
No EOL
1.2 KiB
TOML

[package]
name = "egui"
version = "0.11.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
description = "Simple, portable immediate mode GUI library for Rust"
edition = "2018"
homepage = "https://github.com/emilk/egui"
license = "MIT OR Apache-2.0"
readme = "../README.md"
repository = "https://github.com/emilk/egui"
categories = ["gui", "game-development"]
keywords = ["gui", "imgui", "immediate", "portable", "gamedev"]
include = [
"../LICENSE-APACHE",
"../LICENSE-MIT",
"**/*.rs",
"Cargo.toml",
]
[lib]
[dependencies]
epaint = { version = "0.11.0", path = "../epaint", default-features = false }
serde = { version = "1", features = ["derive", "rc"], optional = true }
ron = { version = "0.6.4", optional = true }
[features]
default = ["default_fonts", "single_threaded"]
# If set, egui will use `include_bytes!` to bundle some fonts.
# If you plan on specifying your own fonts you may disable this feature.
default_fonts = ["epaint/default_fonts"]
persistence = ["serde", "epaint/persistence", "ron"]
# Only needed if you plan to use the same egui::Context from multiple threads.
single_threaded = ["epaint/single_threaded"]
multi_threaded = ["epaint/multi_threaded"]
[dev-dependencies]
serde_json = "1"