API for storing metadata.
See: https://www.pivotaltracker.com/story/show/181149277
# Important Notes
**New APIs**:
- Storing metadata is implemented with `profiler::MetadataLogger`.
- A full metadata storage/retrieval example is in [the top-level doctests](https://github.com/enso-org/enso/blob/wip/kw/profiling-metadata-api/lib/rust/profiler/data/src/lib.rs) for profiler::data, a crate which implements an API for profiling data consumers (it abstracts away the low-level details of the event log, and checks its invariants in the process) [after review of this new API here I'll open a PR to add it to the design doc].
**Implementation**:
- `profiler::Event` is parameterized by a metadata type, so that different types of metadata can be dependency-injected into it.
- A data consumer defines its metadata type as an enum of all the kinds of metadata it is interested in.
- Producing the metadata enum is accomplished without defining its type (which would require dependencies from around the app): A `MetadataLogger` internally use a serialization helper `Variant` to serialize its variant of the metadata enum without knowledge of the other possible variants.
**Performance impact**: still in the low ns/measurement range, comparable to pushing to a vec.
*Note*: `LocalVecBuilder` is currently present under the name `Log`, which is accurate but probably too overloaded. I'd like to find the right name for it, document it with examples, and move it to its own crate under data-structures, but I don't want doing that to hold up this PR.
* profiling instrumentation
* Support native testing with mock impl of `mod js`
* Add benchmarks
* Wrapper: support methods.
* `#[profile]`: work in any context
* feature-gate lineno info that breaks IDE
* Support async; more docs; add perf analysis
* docs & formatting
This change adds utility code for calculating summaries from multiple samples (snapshots) of EnsoGL runtime stats values.
This internal feature is expected to be used by Enso IDE performance profiling tools, which are planned to be added in the near future.
https://www.pivotaltracker.com/story/show/181093920
A demo scene named `stats` was added, showcasing how to perform calculations using the new tools. Currently, the summary calculations in the scene work only when the EnsoGL stats Monitor Panel is visible; this is planned to be improved in a future task (https://www.pivotaltracker.com/story/show/181093601).
- Note: the stats aggregation code is intended to be later used in Enso IDE's main rendering loop, so it needs to have very good performance characteristics.
- Due to that, `Accumulator` was designed to only use simple addition arithmetic, and be constant-memory once created.
This PR adds `json-rpc` crate — a library facilitating writing clients using JSON-RPC 2.0 protocol.
This library is meant to be used in implementation of File Manager and, in future, of Language Server clients.
The library is agnostic about `Transport` — but the interface has been designed in compliance with web-sys websockets, as this will be primary platform.
The RPC clients implemented on top of this library are expected to provide Future-based asynchronous API.
Client is designed to work in a single-thread environment,
Implements #426.
AST lives in `ast` package, that relies significantly on `ast-macros` to generate boilerplate.
Additional `macro-utils` library was split out from `shapely-macros` and `ast-macros`.
The implementation was contributed by @wdanilo , I basically just did some refactoring, documenting and testing.
### Important Notes
* AST is known to be incomplete structurally, finishing it is #336
* AST is missing a number of necessary functions, some of them explicitly marked as FIXME in the code, finishing them is #338
* while I have written some tests, they are not yet part of CI — I want to this smart way (i.e. allowing tests that rely on parser), it is tracked as #340
* AST JSON serialization is incompatible with Scala, solving this is #297
* there is some non-deterministic issue with CI on Windows — I need to look into this closer but it seems to not be related to any Rust parts