enso/build
Kaz Wesley 662992eb37
Replace tracing (#4017)
Logging: Replace tracing with an efficient logging implementation, with 0-runtime cost for disabled log levels. (https://www.pivotaltracker.com/story/show/183755412)

Profiling: Support submitting `profiler` events to the User Timing Web API, so that measurements can be viewed directly in the browser. (https://www.pivotaltracker.com/story/show/184003550)

# Important Notes
Logging interface:
- The macros (`warn!`, etc.) now take standard `format_args!` arguments (the tracing implementations accepted a broader syntax).
- Compile-time log levels can now be set through the CLI, like so:
`./run ide start --log-level=trace --uncollapsed-log-level=info`

Profiling:
- The hotkey Ctrl+Alt+Shift+P submits all `profiler` events logged since the application was loaded to the Web API, so that they can then be viewed with the browser's developer tools. Note that standard tools are not able to represent async task lifetimes or metadata; this is a convenient interface to a subset of `profiler` data.
- As an alternative interface, a runtime flag enables continuous measurement submission. In the browser it can be set through a URL parameter, like http://localhost:8080/?emit_user_timing_measurements=true. Note that this mode significantly impacts performance.
2023-01-16 20:31:01 +00:00
..
base Build script updates (#3975) 2022-12-15 20:29:00 +01:00
build Replace tracing (#4017) 2023-01-16 20:31:01 +00:00
ci_utils Package MSVC CRT redistributables in with the backend native images. (#4019) 2023-01-16 15:06:00 +01:00
cli Replace tracing (#4017) 2023-01-16 20:31:01 +00:00
deprecated Build script merge (#3743) 2022-10-10 23:38:48 +02:00
enso-formatter Wip/wdanilo/text shape system single scene 183406745 (#3776) 2022-11-03 08:35:06 +01:00
intellij-run-config-gen Bump rustc nightly-2022-11-22 (#3911) 2022-11-30 03:16:25 +01:00
macros Release process (#3909) 2022-12-02 02:56:22 +01:00
prettier Build script merge (#3743) 2022-10-10 23:38:48 +02:00
.gitignore Build script merge (#3743) 2022-10-10 23:38:48 +02:00
README.md Build script merge (#3743) 2022-10-10 23:38:48 +02:00


Enso Language

[WIP] Enso CI Build Scripts

The code under this directory is under ongoing intensive development. As such it has not been reviewed or cleaned up yet.

General principles

  • Written in Rust.
  • Portable. Works on any platform that Enso targets.
  • Do not duplicate functionality that is already available in tools being part of our tech stack.
  • Supports both developers and CI use-cases (and environments). Developers can call it locally to do anything that CI does.
  • Does not require much setup work. Where feasible sets things up for the user.

Concepts

Target

  • Can be built locally from sources. Building yields artifacts.
  • Artifacts are self-contained to a single filesystem directory.
  • Artifacts can be downloaded from a remote location rather than built with the same effect.
  • Can contain other targets.
  • Artifacts can be platform-specific.
  • Artifacts must be releasable as CI run artifacts or release assets.

Usage

While the script is invoked using cargo run, the convenience run script is provided in the repository root.

The general usage form is:

./run <command> [options]

The command itself is usually a combination of target name and subcommand, like ide build or backend test.

At every layer, the --help command can be used to get more information. Note that the information depends on the command, so running ./run --help will not give you the same information as ./run ide --help nor ./run ide build --help.

Targets

IDE

IDE is the top level target for our project. It consists of GUI and Backend targets.

Sources consist mostly of TS code for the Electron client and packaging.

Artifacts are platform specific and consist of the single image file.

GUI

GUI is the front-end part of the project. It consists of WASM target.

Sources consist mostly of TS code for the web page that embeds the WASM binaries.

Artifacts are portable across the platforms and consist of the web page that can be served either using Electron client (as IDE does) or using a web server (like the Cloud version of Enso).

WASM

This is the core of GUI, written in Rust. It has no external dependencies.

Artifacts are portable across the platforms and consist of the single WASM binary accompanied by the JS snippets and glue.

Backend

Backend is the back-end part of the project, as seen from the IDE perspective. It contains a Project Manager bundle that includes:

  • Project Manager native image;
  • Enso Engine distribution (with the Standard Library);
  • GraalVM distribution.

These components are not represented as "Targets" (in terms of build script) but could be and likely will be in the future.