enso/gui
2020-02-18 14:40:24 -03:00
..
.github Node shapes part 1, build time optimization, lazy WASM loader. (https://github.com/enso-org/ide/pull/162) 2020-02-11 00:47:03 +01:00
app Initial Project View (https://github.com/enso-org/ide/pull/159) 2020-02-18 14:40:24 -03:00
build-utilities Add IDE Code From enso Repository (https://github.com/enso-org/ide/pull/128) 2020-01-29 21:30:09 +01:00
docs Minor language improvements (https://github.com/enso-org/ide/pull/120) 2020-01-22 16:01:11 +01:00
lib Initial Project View (https://github.com/enso-org/ide/pull/159) 2020-02-18 14:40:24 -03:00
script Mock File Manager Server (https://github.com/enso-org/ide/pull/167) 2020-02-12 02:54:21 +01:00
.gitignore Buffer Management for BaseGL (https://github.com/enso-org/ide/pull/51) 2019-11-27 18:04:33 +01:00
.rustfmt.toml Buffer Management for BaseGL (https://github.com/enso-org/ide/pull/51) 2019-11-27 18:04:33 +01:00
Cargo.toml Initial Project View (https://github.com/enso-org/ide/pull/159) 2020-02-18 14:40:24 -03:00
LICENSE Cleaning codebase + initial texture support (https://github.com/enso-org/ide/pull/110) 2020-01-15 15:47:44 +01:00
README.md TextField keyboard input. (https://github.com/enso-org/ide/pull/170) 2020-02-13 10:26:42 +01:00

License Actions Status Coverage Stability

BaseGL

BaseGL is a blazing fast 2D vector rendering engine with a rich set of primitives and a GUI component library. It is able to display millions of shapes 60 frames per second in a web browser on a modern laptop hardware.

This repository is a work in progress of BaseGL 2.0. Please refer to BaseGL 1.0 repository for more information: https://github.com/luna/basegl-old.

Development

The Rust toolchain

This project uses several features available only in the nightly Rust toolchain. To setup the toolchain, please use the the Rust toolchain installer:

rustup toolchain install nightly-2019-11-04 # Install the nightly channel.
rustup default nightly                      # Set it as the default one.
rustup component add clippy                 # Install the linter.

Building the sources

Please use the script/build.sh script to build the project or the script/watch.sh script to run a file watch utility which will build the project on every source change. The scripts are thin wrappers for wasm-pack and accept the same command line arguments. In particular, you can provide them with --release, --dev, or --profile flags to switch the compilation profile. If not option is provided, the scripts default to the --release profile.

Running application and examples

For best experience, it is recommended to use the scripts/watch.sh --dev in a second shell. In order to build the IDE application, follow the steps below:

cd app
npm install
npm run start 

You can now navigate to http://localhost:8080 and play with it! The example scenes will be available at http://localhost:8080/debug.

While Webpack provides handy utilities for development, like live-reloading on sources change, it also adds some runtime overhead. In order to run the compiled examples using a lightweight http-server (without live-reloading functionality), please use the npm run prod-server command.

Please remember to disable the cache in your browser during development!

Minimizing the WASM binary size.

After building the project you can use the scripts/minimize_wasm.sh to optimize the binary and compress it by using gzip. After the script is complete, the final size is printed to stdout. Please note that in order to run the script, the Binaryen toolkit has to be installed on your system.

Running tests

The sources use both unit tests and web test, which are run in a browser and produce visual results. To run them, use the scripts/test.sh script and follow the output in the terminal.

Working with the source code

Formatting

Please note that this codebase does not use rustfmt. Please read the following documents to learn more about reasons behind this decision and the recommended code style guide. Be sure to carefully read the documents before contributing to this repository:

Linting

Please be sure to fix all errors reported by scripts/lint.sh before creating a pull request to this repository.