Original commit: c38ca0d5a4
This commit is contained in:
Wojciech Daniło 2020-03-16 03:58:00 +01:00 committed by GitHub
parent 757b4cbe7d
commit e10fc464a8
365 changed files with 1142 additions and 1068 deletions

View File

@ -1 +1,2 @@
* @wdanilo * @wdanilo
src/rust/ide @farmaazon

View File

@ -1,6 +1,6 @@
--- ---
name: Bug Report name: Bug Report
about: Report a bug in BaseGL. about: Report a bug in Enso IDE.
title: '' title: ''
labels: 'Type: Bug' labels: 'Type: Bug'
assignees: '' assignees: ''
@ -8,7 +8,7 @@ assignees: ''
--- ---
<!-- <!--
Please ensure that you are using the latest version of BaseGL before reporting Please ensure that you are using the latest version of Enso IDE before reporting
the bug! It may have been fixed since. the bug! It may have been fixed since.
--> -->
@ -35,5 +35,5 @@ Please list the reproduction steps for your bug.
### Enso Version ### Enso Version
<!-- <!--
- Please include the version of BaseGL you are using here. - Please include the version of Enso IDE you are using here.
--> -->

View File

@ -1,6 +1,6 @@
--- ---
name: Epic name: Epic
about: Create a new epic for BaseGL development. about: Create a new epic for Enso IDE development.
title: '' title: ''
labels: '' labels: ''
assignees: '' assignees: ''

View File

@ -1,6 +1,6 @@
--- ---
name: Feature Request name: Feature Request
about: Request a new feature in BaseGL. about: Request a new feature in Enso IDE.
title: '' title: ''
labels: 'Type: Enhancement' labels: 'Type: Enhancement'
assignees: '' assignees: ''
@ -8,7 +8,7 @@ assignees: ''
--- ---
<!-- <!--
Please ensure that you check the latest version of BaseGL to see if your feature Please ensure that you check the latest version of Enso IDE to see if your feature
has been implemented. has been implemented.
--> -->
@ -19,6 +19,6 @@ has been implemented.
### Motivation ### Motivation
<!-- <!--
- A description of the motivation for adding this feature to BaseGL. - A description of the motivation for adding this feature to Enso IDE.
- Ideally this would include use-cases that support the feature. - Ideally this would include use-cases that support the feature.
--> -->

View File

@ -1,6 +1,6 @@
--- ---
name: Task name: Task
about: Create a new development task for BaseGL. about: Create a new development task for Enso IDE.
title: '' title: ''
labels: '' labels: ''
assignees: '' assignees: ''

View File

@ -14,19 +14,98 @@ jobs:
strategy: strategy:
matrix: matrix:
os: [windows-latest, macOS-latest, ubuntu-latest] os: [windows-latest, macOS-latest, ubuntu-latest]
fail-fast: false
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Install Rust Nightly Toolchain - name: Install Rust
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
toolchain: nightly-2019-11-04 toolchain: nightly-2019-11-04
override: true override: true
- name: Run cargo check - name: Install wasm-pack
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
command: check command: install
args: wasm-pack --version 0.8.1
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: '12.16.1'
- name: Build
run: node ./run dist
- name: Upload Artifacts (Ubuntu, AppImage)
uses: actions/upload-artifact@v1
with:
name: Enso IDE (Linux, AppImage)
path: dist/client/Enso Studio-2.0.0-alpha.0.AppImage
if: matrix.os == 'ubuntu-latest'
- name: Upload Artifacts (Ubuntu, not packed)
uses: actions/upload-artifact@v1
with:
name: Enso IDE (Linux, not packed)
path: dist/client/linux-unpacked
if: matrix.os == 'ubuntu-latest'
- name: Upload Artifacts (Windows, Installer)
uses: actions/upload-artifact@v1
if: matrix.os == 'windows-latest'
with:
name: Enso IDE (Windows, installer)
path: dist/client/Enso Studio Setup 2.0.0-alpha.0.exe
- name: Upload Artifacts (Windows, not packed)
uses: actions/upload-artifact@v1
if: matrix.os == 'windows-latest'
with:
name: Enso IDE (Windows, not packed)
path: dist/client/win-unpacked
- name: Upload Artifacts (macOS, dmg)
uses: actions/upload-artifact@v1
if: matrix.os == 'macos-latest'
with:
name: Enso IDE (macOS, dmg)
path: dist/client/Enso Studio-2.0.0-alpha.0.dmg
- name: Upload Artifacts (macOS, app)
uses: actions/upload-artifact@v1
if: matrix.os == 'macos-latest'
with:
name: Enso IDE (macOS, app)
path: dist/client/mac/Enso Studio.app
lint:
name: Lint
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macOS-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2019-11-04
override: true
- name: Install Clippy
run: rustup component add clippy
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: '12.16.1'
- name: Building Rust Sources
run: node ./run lint
test: test:
@ -38,7 +117,8 @@ jobs:
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1 - name: Install Rust
uses: actions-rs/toolchain@v1
with: with:
toolchain: nightly-2019-11-04 toolchain: nightly-2019-11-04
override: true override: true
@ -49,112 +129,56 @@ jobs:
command: install command: install
args: wasm-pack --version 0.8.1 args: wasm-pack --version 0.8.1
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: '12.16.1'
- name: Run tests - name: Run tests
uses: actions-rs/cargo@v1 run: node ./run test
with:
command: test
- name: Run wasm-pack tests
uses: actions-rs/cargo@v1
with:
command: run
args: >
--manifest-path=build/rust/Cargo.toml
--bin test-all
-- --headless --chrome
size: # TODO: enable after fixing https://github.com/actions-rs/grcov/issues/50
name: Check size # coverage:
runs-on: ubuntu-latest # name: Coverage
steps: # runs-on: ubuntu-latest
- uses: actions/checkout@v1 # steps:
# - uses: actions/checkout@v1
- name: Install Rust Nightly Toolchain #
uses: actions-rs/toolchain@v1 # - name: Install Rust
with: # uses: actions-rs/toolchain@v1
toolchain: nightly-2019-11-04 # with:
override: true # toolchain: nightly-2019-11-04
# override: true
- name: Install wasm-pack #
uses: actions-rs/cargo@v1 # - name: Install Node
with: # uses: actions/setup-node@v1
command: install # with:
args: wasm-pack --version 0.8.1 # node-version: '12.16.1'
#
- uses: actions/setup-node@v1 # - name: Generate test profile
with: # working-directory: src/rust
node-version: '12.16.1' # run: cargo test --all-features --no-fail-fast
# env:
- name: check npm # 'CARGO_INCREMENTAL': '0'
run: npm --version # 'RUSTFLAGS': '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads'
#
- name: Compile to WASM # - name: Generate coverage report
run: ./run build # id: coverage
# uses: actions-rs/grcov@v0.1
- name: Check WASM size #
run: ./build/assert_max_wasm_size.sh # - name: Show the coverage report
# run: cat ${{ steps.coverage.outputs.report }}
#
# - name: Upload the coverage report
# uses: codecov/codecov-action@v1.0.2
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# file: ./lcov.info
clippy: build-fm:
name: Linter name: Build File Manager Server Mock
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2019-11-04
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Rust Nightly Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2019-11-04
override: true
- name: Generate test profile
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --no-fail-fast
env:
'CARGO_INCREMENTAL': '0'
'RUSTFLAGS': '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads'
- name: Generate coverage report
id: coverage
uses: actions-rs/grcov@v0.1
- name: list all /tmp files
run: ls -la /tmp
- name: show the coverage report
run: cat ${{ steps.coverage.outputs.report }}
- name: Upload coverage report
uses: codecov/codecov-action@v1.0.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./lcov.info
package:
name: Package
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
@ -163,108 +187,33 @@ jobs:
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1 - name: Install Rust
with: uses: actions-rs/toolchain@v1
toolchain: nightly-2019-11-04
override: true
- name: Install wasm-pack
uses: actions-rs/cargo@v1
with:
command: install
args: wasm-pack --version 0.8.1
- uses: actions/setup-node@v1
with:
node-version: '12.16.1'
- name: check npm
run: npm --version
- name: Build Enso IDE
run: node run dist --no-validation
- uses: actions/upload-artifact@v1
name: Upload Artifacts (Ubuntu, AppImage)
with:
name: Enso IDE (Linux, AppImage)
path: app/dist/native/Enso Studio-1.0.0.AppImage
if: matrix.os == 'ubuntu-latest'
- uses: actions/upload-artifact@v1
name: Upload Artifacts (Ubuntu, not packed)
with:
name: Enso IDE (Linux, not packed)
path: app/dist/native/linux-unpacked
if: matrix.os == 'ubuntu-latest'
- uses: actions/upload-artifact@v1
name: Upload Artifacts (Windows, Installer)
if: matrix.os == 'windows-latest'
with:
name: Enso IDE (Windows, installer)
path: app/dist/native/Enso Studio Setup 1.0.0.exe
- uses: actions/upload-artifact@v1
name: Upload Artifacts (Windows, not packed)
if: matrix.os == 'windows-latest'
with:
name: Enso IDE (Windows, not packed)
path: app/dist/native/win-unpacked
- uses: actions/upload-artifact@v1
name: Upload Artifacts (macOS, dmg)
if: matrix.os == 'macos-latest'
with:
name: Enso IDE (macOS, dmg)
path: app/dist/native/Enso Studio-1.0.0.dmg
- uses: actions/upload-artifact@v1
name: Upload Artifacts (macOS, app)
if: matrix.os == 'macos-latest'
with:
name: Enso IDE (macOS, app)
path: app/dist/native/mac/Enso Studio.app
package-fm:
name: Package mock File Manager Server
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macOS-latest, ubuntu-latest]
fail-fast: false
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with: with:
toolchain: nightly-2019-11-04 toolchain: nightly-2019-11-04
override: true override: true
- name: Build File Manager Server - name: Build File Manager Server
uses: actions-rs/cargo@v1 working-directory: src/rust
with: run: cargo build --release --bin file-manager-server
command: build
args: --release --bin file-manager-server
- uses: actions/upload-artifact@v1 - name: Upload Artifacts (Ubuntu)
name: Upload Artifacts (Ubuntu) uses: actions/upload-artifact@v1
with: with:
name: File Manager Server (Linux) name: File Manager Server (Linux)
path: target/release/file-manager-server path: src/rust/target/release/file-manager-server
if: matrix.os == 'ubuntu-latest' if: matrix.os == 'ubuntu-latest'
- uses: actions/upload-artifact@v1 - name: Upload Artifacts (macOS)
name: Upload Artifacts (macOS) uses: actions/upload-artifact@v1
with: with:
name: File Manager Server (macOS) name: File Manager Server (macOS)
path: target/release/file-manager-server path: src/rust/target/release/file-manager-server
if: matrix.os == 'macos-latest' if: matrix.os == 'macos-latest'
- uses: actions/upload-artifact@v1 - name: Upload Artifacts (Ubuntu)
name: Upload Artifacts (Ubuntu) uses: actions/upload-artifact@v1
with: with:
name: File Manager Server (Windows) name: File Manager Server (Windows)
path: target/release/file-manager-server.exe path: src/rust/target/release/file-manager-server.exe
if: matrix.os == 'windows-latest' if: matrix.os == 'windows-latest'

4
gui/.gitignore vendored
View File

@ -1,3 +1,5 @@
dist
# Rust # Rust
/target /target
/build/rust/target/ /build/rust/target/
@ -9,7 +11,7 @@ wasm-pack.log
.idea/ .idea/
*.iml *.iml
# VisualStudio Code # Visual Studio Code
.vscode/ .vscode/
# A thirdparty downloaded js # A thirdparty downloaded js

View File

@ -38,11 +38,11 @@
alt="License"> alt="License">
</a> </a>
<a href="https://github.com/luna/ide/actions"> <a href="https://github.com/luna/ide/actions">
<img src="https://github.com/luna/basegl/workflows/Build%20%28MacOS%2C%20Linux%2C%20Windows%29/badge.svg" <img src="https://github.com/luna/ide/workflows/Build%20%28MacOS%2C%20Linux%2C%20Windows%29/badge.svg"
alt="Actions Status"> alt="Actions Status">
</a> </a>
<a href="https://codecov.io/gh/luna/ide/branch/master"> <a href="https://codecov.io/gh/luna/ide/branch/master">
<img src="https://img.shields.io/codecov/c/github/luna/basegl?label=Coverage&labelColor=2c3239" <img src="https://img.shields.io/codecov/c/github/luna/ide?label=Coverage&labelColor=2c3239"
alt="Coverage"> alt="Coverage">
</a> </a>
</p> </p>

View File

@ -1,19 +0,0 @@
{
"name": "root",
"version": "2.0.0-alpha.0",
"private": true,
"devDependencies": {
"lerna": "^3.20.2",
"webpack": "^4.42.0",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.1.5"
},
"scripts": {
"build": "lerna run build --stream",
"clean": "rm -Rf node_modules && rm -Rf dist && lerna clean -y && lerna run clean",
"dist": "lerna run build --stream && lerna run dist --stream",
"install": "npm install lerna && lerna bootstrap",
"start": "npm run build && lerna run start --stream -- -- ",
"watch": "lerna run watch --stream"
}
}

View File

@ -1,82 +0,0 @@
{
"name": "enso-studio-client",
"description": "The standalone client part of the IDE.",
"version": "1.0.0",
"author": {
"name": "Enso Team",
"email": "contact@luna-lang.org"
},
"homepage": "https://github.com/luna/basegl",
"repository": {
"type": "git",
"url": "git@github.com:luna/basegl.git"
},
"bugs": {
"url": "https://github.com/luna/basegl/issues"
},
"main": "index.js",
"build": {
"appId": "org.enso.studio",
"productName": "Enso Studio",
"copyright": "Copyright © 2020 ${author}.",
"mac": {
"icon": "dist/icons/icon.icns",
"category": "public.app-category.developer-tools",
"darkModeSupport": true,
"type": "distribution"
},
"win": {
"icon": "dist/icons/icon.ico"
},
"linux": {
"icon": "dist/icons/png",
"category": "Development"
},
"files": [
{ "from": "dist/unpacked" , "to": "." }
],
"fileAssociations": [
{
"ext": "enso",
"name": "Enso Source File",
"role": "Editor"
},
{
"ext": "enso-studio",
"name": "Enso Studio Project",
"role": "Editor"
}
],
"directories": {
"output": "../../dist/native"
}
},
"dependencies": {
"enso-studio-content": "1.0.0",
"enso-studio-common": "1.0.0",
"enso-studio-icons": "1.0.0",
"copy-webpack-plugin": "^5.1.1",
"create-servers": "^3.1.0",
"electron-is-dev": "^1.1.0"
},
"devDependencies": {
"compression-webpack-plugin": "^3.1.0",
"copy-webpack-plugin": "^5.1.1",
"devtron": "^1.4.0",
"electron": "8.0.2",
"electron-builder": "^22.3.2"
},
"scripts": {
"clean": "rm -Rf dist",
"start": "electron dist/unpacked -- ",
"build": "webpack ",
"dist": "electron-builder",
"dist:crossplatform": "electron-builder --mac --win --linux"
}
}

View File

@ -1,40 +0,0 @@
const Copy = require('copy-webpack-plugin')
const path = require('path')
const root = path.resolve(__dirname)
module.exports = {
entry: {
index: path.resolve(root,'src','index.js'),
},
mode: 'production',
target: "electron-main",
output: {
path: path.resolve(root,'dist','unpacked'),
filename: '[name].js',
},
plugins: [
new Copy([
{
from : path.resolve(root,'..','content','dist','assets'),
to : path.resolve(root,'dist','unpacked','assets')
},
{
from : path.resolve(root,'..','icons','dist'),
to : path.resolve(root,'dist','icons')
},
{
from : path.resolve('package.json'),
to : path.resolve(root,'dist','unpacked','package.json')
},
{
from : path.resolve('src/preload.js'),
to : path.resolve(root,'dist','unpacked','preload.js')
}
]),
],
performance: {
hints: false,
},
stats: 'minimal',
}

View File

@ -1,27 +0,0 @@
{
"name": "enso-studio-common",
"version": "1.0.0",
"author": {
"name": "Enso Team",
"email": "contact@luna-lang.org"
},
"homepage": "https://github.com/luna/basegl",
"repository": {
"type": "git",
"url": "git@github.com:luna/basegl.git"
},
"bugs": {
"url": "https://github.com/luna/basegl/issues"
},
"dependencies": {
"copy-webpack-plugin": "^5.1.1"
},
"devDependencies": {
"compression-webpack-plugin": "^3.1.0",
"copy-webpack-plugin": "^5.1.1"
},
"scripts": {
"clean": "rm -Rf dist"
}
}

View File

@ -1,29 +0,0 @@
{
"name": "enso-studio-content",
"version": "1.0.0",
"author": {
"name": "Enso Team",
"email": "contact@luna-lang.org"
},
"homepage": "https://github.com/luna/basegl",
"repository": {
"type": "git",
"url": "git@github.com:luna/basegl.git"
},
"bugs": {
"url": "https://github.com/luna/basegl/issues"
},
"scripts": {
"clean": "rm -Rf dist",
"build": "webpack",
"watch": "webpack-dev-server"
},
"dependencies": {
"enso-studio-common": "1.0.0",
"copy-webpack-plugin": "^5.1.1"
},
"devDependencies": {
"compression-webpack-plugin": "^3.1.0",
"copy-webpack-plugin": "^5.1.1"
}
}

View File

@ -1,24 +0,0 @@
{
"name": "enso-studio-icons",
"version": "1.0.0",
"author": {
"name": "Enso Team",
"email": "contact@luna-lang.org"
},
"homepage": "https://github.com/luna/basegl",
"repository": {
"type": "git",
"url": "git@github.com:luna/basegl.git"
},
"bugs": {
"url": "https://github.com/luna/basegl/issues"
},
"scripts": {
"clean": "rm -Rf dist",
"build": "node src/index.js"
},
"devDependencies": {
"sharp": "^0.24.1",
"to-ico": "^1.1.5"
}
}

View File

@ -1,26 +0,0 @@
{
"name": "enso-studio-server",
"version": "1.0.0",
"author": {
"name": "Enso Team",
"email": "contact@luna-lang.org"
},
"homepage": "https://github.com/luna/basegl",
"repository": {
"type": "git",
"url": "git@github.com:luna/basegl.git"
},
"bugs": {
"url": "https://github.com/luna/basegl/issues"
},
"scripts": {
"clean": "rm -Rf dist"
},
"dependencies": {
"copy-webpack-plugin": "^5.1.1"
},
"devDependencies": {
"compression-webpack-plugin": "^3.1.0",
"copy-webpack-plugin": "^5.1.1"
}
}

View File

@ -1,17 +0,0 @@
#!/bin/bash
echoerr() { echo "$@" 1>&2; }
current_size=$(./build/minimize_wasm.sh)
current_size_len=$((${#current_size} - 1))
current_size="${current_size:0:current_size_len}"
max_size=2.3 # MiB
echo "Current size: ${current_size}MiB. Expected maximum size: ${max_size}MiB"
if (( $(echo "$current_size <= $max_size" |bc -l) ));
then
echo OK
else
echoerr FAIL
exit 1
fi

View File

@ -1,7 +1,6 @@
let spawn = require('child_process').spawn let spawn = require('child_process').spawn
let exec = require('child_process').exec let exec = require('child_process').exec
function section(title) { function section(title) {
let border = '-'.repeat(8 + title.length) let border = '-'.repeat(8 + title.length)
let middle = '--- ' + title + ' ---' let middle = '--- ' + title + ' ---'

View File

@ -1,14 +0,0 @@
#!/bin/bash
cd target/web || exit 1
cmd=$(command -v wasm-opt)
cmd_len=${#cmd}
if [ $cmd_len -eq 0 ]
then
npm install binaryen
fi
npx wasm-opt -O3 -o gui_opt.wasm gui.wasm
gzip --best --force gui_opt.wasm
du -h gui_opt.wasm.gz | awk '{ print $1 }'

View File

@ -23,6 +23,25 @@
"color-convert": "^2.0.1" "color-convert": "^2.0.1"
} }
}, },
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
},
"binaryen": {
"version": "91.0.0",
"resolved": "https://registry.npmjs.org/binaryen/-/binaryen-91.0.0.tgz",
"integrity": "sha512-IPeiSHceT5/VXOQ9W4f9k/ryoA1QGdCvpeyFPKsIZQvctN8e1xgvVFK5HHxgfAPf2gWy+plrFdJK5xSe4W8cFQ=="
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"camelcase": { "camelcase": {
"version": "5.3.1", "version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
@ -51,6 +70,11 @@
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
}, },
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"decamelize": { "decamelize": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
@ -70,11 +94,43 @@
"path-exists": "^4.0.0" "path-exists": "^4.0.0"
} }
}, },
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"get-caller-file": { "get-caller-file": {
"version": "2.0.5", "version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
}, },
"glob": {
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"requires": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"is-fullwidth-code-point": { "is-fullwidth-code-point": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
@ -88,16 +144,27 @@
"p-locate": "^4.1.0" "p-locate": "^4.1.0"
} }
}, },
"minimist": { "minimatch": {
"version": "1.2.0", "version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"requires": {
"brace-expansion": "^1.1.7"
}
}, },
"ncp": { "ncp": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz",
"integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=" "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M="
}, },
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"requires": {
"wrappy": "1"
}
},
"p-limit": { "p-limit": {
"version": "2.2.2", "version": "2.2.2",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz",
@ -124,6 +191,11 @@
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="
}, },
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"require-directory": { "require-directory": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@ -172,6 +244,11 @@
"strip-ansi": "^6.0.0" "strip-ansi": "^6.0.0"
} }
}, },
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"y18n": { "y18n": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",

View File

@ -4,6 +4,8 @@
"description": "Build Scripts", "description": "Build Scripts",
"repository": "git@github.com:luna/ide.git", "repository": "git@github.com:luna/ide.git",
"dependencies": { "dependencies": {
"binaryen": "^91.0.0",
"glob": "^7.1.6",
"ncp": "^2.0.0", "ncp": "^2.0.0",
"yargs": "^15.3.0" "yargs": "^15.3.0"
}, },

39
gui/build/paths.js Normal file
View File

@ -0,0 +1,39 @@
const path = require('path')
// =============
// === Paths ===
// =============
let paths = {}
paths.root = path.dirname(__dirname)
paths.script = {}
paths.script.main = path.join(paths.root,'run')
paths.script.root = path.join(paths.root,'build')
paths.script.run = path.join(paths.script.root,'run')
paths.dist = {}
paths.dist.root = path.join(paths.root,'dist')
paths.dist.client = path.join(paths.dist.root,'client')
paths.dist.content = path.join(paths.dist.root,'content')
paths.dist.init = path.join(paths.dist.root,'init')
paths.dist.buildInfo = path.join(paths.dist.root,'build.json')
paths.dist.wasm = {}
paths.dist.wasm.root = path.join(paths.dist.root,'wasm')
paths.dist.wasm.main = path.join(paths.dist.wasm.root,'gui.wasm')
paths.dist.wasm.mainRaw = path.join(paths.dist.wasm.root,'gui_bg.wasm')
paths.dist.wasm.glue = path.join(paths.dist.wasm.root,'gui.js')
paths.dist.wasm.mainOpt = path.join(paths.dist.wasm.root,'gui_opt.wasm')
paths.dist.wasm.mainOptGz = path.join(paths.dist.wasm.root,'gui_opt.wasm.gz')
paths.js = {}
paths.js.root = path.join(paths.root,'src','js')
paths.rust = {}
paths.rust.root = path.join(paths.root,'src','rust')
module.exports = paths

View File

@ -1,17 +1,33 @@
let fss = require('fs') const cmd = require('./cmd')
let fs = require('fs').promises const fs = require('fs').promises
let cmd = require('./lib/cmd') const fss = require('fs')
let ncp = require('ncp').ncp const glob = require('glob')
let yargs = require('yargs') const ncp = require('ncp').ncp
const path = require('path')
const paths = require('./paths')
const stream = require('stream');
const yargs = require('yargs')
const zlib = require('zlib');
process.on('unhandledRejection', error => { throw(error) })
process.chdir(paths.root)
const { promisify } = require('util')
const pipe = promisify(stream.pipeline)
async function gzip(input, output) {
const gzip = zlib.createGzip()
const source = fss.createReadStream(input)
const destination = fss.createWriteStream(output)
await pipe(source,gzip,destination)
}
// ==================== // ========================
// === Global Setup === // === Global Variables ===
// ==================== // ========================
let root = __dirname + '/..'
process.chdir(root)
/// Arguments passed to sub-processes called from this script. This variable is set to a specific /// Arguments passed to sub-processes called from this script. This variable is set to a specific
/// value after the command line args get parsed. /// value after the command line args get parsed.
@ -61,14 +77,13 @@ let commands = {}
commands.clean = command(`Clean all build artifacts`) commands.clean = command(`Clean all build artifacts`)
commands.clean.js = async function() { commands.clean.js = async function() {
await cmd.with_cwd('app', async () => { await cmd.with_cwd(paths.js.root, async () => {
await run('npm',['run','clean']) await run('npm',['run','clean'])
}) })
try { await fs.unlink('.initialized') } catch {} try { await fs.unlink(paths.dist.init) } catch {}
} }
commands.clean.rust = async function() { commands.clean.rust = async function() {
try { await fs.rmdir('app/generated') } catch {}
await run('cargo',['clean']) await run('cargo',['clean'])
} }
@ -86,22 +101,33 @@ commands.check.rust = async function() {
commands.build = command(`Build the sources in release mode`) commands.build = command(`Build the sources in release mode`)
commands.build.js = async function() { commands.build.js = async function() {
console.log(`Building JS target.`) console.log(`Building JS target.`)
await cmd.with_cwd('app', async () => {
await run('npm',['run','build']) await run('npm',['run','build'])
})
} }
commands.build.rust = async function() { commands.build.rust = async function(argv) {
console.log(`Building WASM target.`) console.log(`Building WASM target.`)
await run('wasm-pack',['build','--target','web','--no-typescript','--out-dir','../../target/web','lib/gui']) let args = ['build','--target','web','--no-typescript','--out-dir',paths.dist.wasm.root,'lib/debug-scenes']
await patch_file('target/web/gui.js', js_workaround_patcher) if (argv.dev) { args.push('--dev') }
await fs.rename('target/web/gui_bg.wasm','target/web/gui.wasm') await run('wasm-pack',args)
await patch_file(paths.dist.wasm.glue, js_workaround_patcher)
await fs.rename(paths.dist.wasm.mainRaw, paths.dist.wasm.main)
if (!argv.dev) {
// TODO: Enable after updating wasm-pack
// https://github.com/rustwasm/wasm-pack/issues/696
// console.log('Optimizing the WASM binary.')
// await cmd.run('npx',['wasm-opt','-O3','-o',paths.dist.wasm.mainOpt,paths.dist.wasm.main])
/// We build to provisional location and patch files there before copying, so the backpack don't console.log('Minimizing the WASM binary.')
/// get errors from processing unpatched files. Also, here we copy into (overwriting), without await gzip(paths.dist.wasm.main,paths.dist.wasm.mainOptGz) // TODO main -> mainOpt
/// removing old files. Backpack on Windows does not tolerate removing files it watches.
await fs.mkdir('app/generated', {recursive:true}) console.log('Checking the resulting WASM size.')
await copy('target/web','app/generated/wasm') let stats = fss.statSync(paths.dist.wasm.mainOptGz)
let limit = 2.4
let size = Math.round(100 * stats.size / 1024 / 1024) / 100
if (size > limit) {
throw(`Output file size exceeds the limit (${size}MB > ${limit}MB).`)
}
}
} }
/// Workaround fix by wdanilo, see: https://github.com/rustwasm/wasm-pack/issues/790 /// Workaround fix by wdanilo, see: https://github.com/rustwasm/wasm-pack/issues/790
@ -124,13 +150,13 @@ async function patch_file(path,patcher) {
// === Start === // === Start ===
commands.start = command(`Build and start desktop client`) commands.start = command(`Build and start desktop client`)
commands.start.rust = async function() { commands.start.rust = async function(argv) {
await commands.build.rust() await commands.build.rust(argv)
} }
commands.start.js = async function() { commands.start.js = async function() {
console.log(`Building JS target.`) console.log(`Building JS target.`)
await cmd.with_cwd('app', async () => { await cmd.with_cwd(paths.js.root, async () => {
await run('npm',['run','start','--'].concat(targetArgs)) await run('npm',['run','start','--'].concat(targetArgs))
}) })
} }
@ -140,12 +166,12 @@ commands.start.js = async function() {
commands.test = command(`Run test suites`) commands.test = command(`Run test suites`)
commands.test.rust = async function() { commands.test.rust = async function() {
console.log(`Running WASM test suite.`) console.log(`Running Rust test suite.`)
await run('cargo',['test']) await run('cargo',['test'])
console.log(`Running WASM visual test suite.`) console.log(`Running Rust visual test suite.`)
await run('cargo',['run','--manifest-path=build/rust/Cargo.toml','--bin','test-all', let args = ['run','--manifest-path=test/Cargo.toml','--bin','test_all','--','--headless','--chrome']
'--','--headless','--chrome']) await run('cargo',args)
} }
@ -162,13 +188,15 @@ commands.lint.rust = async function() {
commands.watch = command(`Start a file-watch utility and run interactive mode`) commands.watch = command(`Start a file-watch utility and run interactive mode`)
commands.watch.parallel = true commands.watch.parallel = true
commands.watch.rust = async function() { commands.watch.rust = async function() {
let target = '"' + 'node ./run build --no-js -- --dev ' + subProcessArgs.join(" ") + '"' let target = '"' + `node ${paths.script.main} build --no-js --dev -- ` + subProcessArgs.join(" ") + '"'
let args = ['watch','--watch','lib','-s',`${target}`] let args = ['watch','--watch','lib','-s',`${target}`]
await cmd.with_cwd(paths.rust.root, async () => {
await cmd.run('cargo',args) await cmd.run('cargo',args)
})
} }
commands.watch.js = async function() { commands.watch.js = async function() {
await cmd.with_cwd('app', async () => { await cmd.with_cwd(paths.js.root, async () => {
await run('npm',['run','watch']) await run('npm',['run','watch'])
}) })
} }
@ -177,12 +205,12 @@ commands.watch.js = async function() {
// === Dist === // === Dist ===
commands.dist = command(`Build the sources and create distribution packages`) commands.dist = command(`Build the sources and create distribution packages`)
commands.dist.rust = async function() { commands.dist.rust = async function(argv) {
await commands.build.rust() await commands.build.rust(argv)
} }
commands.dist.js = async function() { commands.dist.js = async function() {
await cmd.with_cwd('app', async () => { await cmd.with_cwd(paths.js.root, async () => {
await run('npm',['run','dist']) await run('npm',['run','dist'])
}) })
} }
@ -219,11 +247,102 @@ optParser.options('js', {
default : true default : true
}) })
optParser.options('release', {
describe : "Enable all optimizations",
type : 'bool',
})
optParser.options('dev', {
describe : "Optimize for fast builds",
type : 'bool',
})
let commandList = Object.keys(commands) let commandList = Object.keys(commands)
commandList.sort() commandList.sort()
for (let command of commandList) { for (let command of commandList) {
let config = commands[command] let config = commands[command]
optParser.command(command,config.docs,(args) => {}, function (argv) { optParser.command(command,config.docs)
}
// ======================
// === Package Config ===
// ======================
function defaultConfig() {
return {
version: "2.0.0-alpha.0",
author: {
name: "Enso Team",
email: "contact@luna-lang.org"
},
homepage: "https://github.com/luna/ide",
repository: {
type: "git",
url: "git@github.com:luna/ide.git"
},
bugs: {
url: "https://github.com/luna/ide/issues"
},
}
}
async function processPackageConfigs() {
let files = []
files = files.concat(glob.sync(paths.js.root + "/package.js", {cwd:paths.root}))
files = files.concat(glob.sync(paths.js.root + "/lib/*/package.js", {cwd:paths.root}))
for (file of files) {
let dirPath = path.dirname(file)
let outPath = path.join(dirPath,'package.json')
let src = await fs.readFile(file,'utf8')
let modSrc = `module = {}\n${src}\nreturn module.exports`
let fn = new Function('require','paths',modSrc)
let mod = fn(require,paths)
let config = mod.config
if (!config) { throw(`Package config '${file}' do not export 'module.config'.`) }
config = Object.assign(defaultConfig(),config)
fs.writeFile(outPath,JSON.stringify(config,undefined,4))
}
}
// ============
// === Main ===
// ============
async function updateBuildVersion () {
let config = {}
let configPath = paths.dist.buildInfo
let exists = fss.existsSync(configPath)
if(exists) {
let configFile = await fs.readFile(configPath)
config = JSON.parse(configFile)
}
let commitHashCmd = await cmd.run_read('git',['rev-parse','--short','HEAD'])
let commitHash = commitHashCmd.trim()
if (config.buildVersion != commitHash) {
config.buildVersion = commitHash
await fs.mkdir(paths.dist.root,{recursive:true})
await fs.writeFile(configPath,JSON.stringify(config,undefined,2))
}
}
async function installJsDeps() {
let initialized = fss.existsSync(paths.dist.init)
if (!initialized) {
console.log('Installing application dependencies')
await cmd.with_cwd(paths.js.root, async () => {
await cmd.run('npm',['run','install'])
})
await fs.mkdir(paths.dist.root, {recursive:true})
await fs.open(paths.dist.init,'w')
}
}
async function runCommand(command,argv) {
let config = commands[command]
subProcessArgs = argv['--'] subProcessArgs = argv['--']
if(subProcessArgs === undefined) { subProcessArgs = [] } if(subProcessArgs === undefined) { subProcessArgs = [] }
let index = subProcessArgs.indexOf('--') let index = subProcessArgs.indexOf('--')
@ -237,48 +356,33 @@ for (let command of commandList) {
let runner = async function () { let runner = async function () {
let do_rust = argv.rust && config.rust let do_rust = argv.rust && config.rust
let do_js = argv.js && config.js let do_js = argv.js && config.js
let rustCmd = () => cmd.with_cwd(paths.rust.root, async () => await config.rust(argv))
let jsCmd = () => cmd.with_cwd(paths.js.root , async () => await config.js(argv))
if(config.parallel) { if(config.parallel) {
let promises = [] let promises = []
if (do_rust) { promises.push(config.rust(argv)) } if (do_rust) { promises.push(rustCmd()) }
if (do_js) { promises.push(config.js(argv)) } if (do_js) { promises.push(jsCmd()) }
await Promise.all(promises) await Promise.all(promises)
} else { } else {
if (do_rust) { await config.rust(argv) } if (do_rust) { await rustCmd() }
if (do_js) { await config.js(argv) } if (do_js) { await jsCmd() }
} }
} }
cmd.section(command) cmd.section(command)
runner() runner()
})
}
// ============
// === Main ===
// ============
async function updateBuildVersion () {
let config = {}
let generatedPath = root + '/app/generated'
let configPath = generatedPath + '/build.json'
let exists = fss.existsSync(configPath)
if(exists) {
let configFile = await fs.readFile(configPath)
config = JSON.parse(configFile)
}
let commitHashCmd = await cmd.run_read('git',['rev-parse','--short','HEAD'])
let commitHash = commitHashCmd.trim()
if (config.buildVersion != commitHash) {
config.buildVersion = commitHash
await fs.mkdir(generatedPath,{recursive:true})
await fs.writeFile(configPath,JSON.stringify(config,undefined,2))
}
} }
async function main () { async function main () {
await processPackageConfigs()
updateBuildVersion() updateBuildVersion()
optParser.argv let argv = optParser.parse()
let command = argv._[0]
if(command == 'clean') {
try { await fs.unlink(paths.dist.init) } catch {}
} else {
await installJsDeps()
}
await runCommand(command,argv)
} }
main() main()

View File

@ -32,7 +32,7 @@ need the following setup:
## Working with sources ## Working with sources
Please note that you should not use a code auto-formatter in this codebase. Please read the following Please note that you should not use a code auto-formatter in this codebase. Please read the following
documents to learn more about reasons behind this decision and the recommended code style guide. documents to learn more about reasons behind this decision and the recommended code style guide.
Be sure to carefully read the [Rust style guide 1](https://github.com/luna/basegl/blob/master/docs/style-guide.md) Be sure to carefully read the [Rust style guide 1](https://github.com/luna/ide/blob/master/docs/style-guide.md)
and the [Rust style guide 2](https://github.com/luna/enso/blob/master/doc/rust-style-guide.md) before and the [Rust style guide 2](https://github.com/luna/enso/blob/master/doc/rust-style-guide.md) before
contributing to the codebase. contributing to the codebase.

View File

@ -1,22 +0,0 @@
[package]
name = "basegl-core-msdf-sys"
version = "0.1.0"
authors = ["Enso Team <contact@luna-lang.org>"]
edition = "2018"
[lib]
crate-type = ["cdylib", "rlib"]
[dependencies]
wasm-bindgen = { version = "=0.2.58" }
js-sys = { version = "0.3.30" }
nalgebra = { version = "0.19.0" }
enso-prelude = { version = "0.1.0", path="../../prelude" }
[dev-dependencies]
wasm-bindgen-test = { version = "0.3.8" }
futures = { version = "0.3.1" }
basegl-core-embedded-fonts = { version = "0.1.0", path="../embedded-fonts" }
[build-dependencies]
basegl-build-utilities = { version = "0.1.0", path="../../../build/utilities" }

View File

@ -1,36 +0,0 @@
[package]
name = "parser"
version = "0.1.0"
authors = ["Enso Team <contact@luna-lang.org>"]
edition = "2018"
build = "build.rs"
[lib]
crate-type = ["cdylib", "rlib"]
[dependencies]
ast = { version = "0.1.0", path = "../ast/impl" }
data = { version = "0.1.0", path = "../../data" }
enso-prelude = { version = "0.1.0", path = "../../prelude" }
utils = { version = "0.1.0", path = "../utils" }
console_error_panic_hook = { version = "0.1.6" }
failure = { version = "0.1" }
js-sys = { version = "0.3" }
matches = { version = "0.1" }
serde = { version = "1.0" , features = ["derive"] }
serde_json = { version = "1.0" }
shrinkwraprs = { version = "0.2.1" }
uuid = { version = "0.8" , features = ["serde", "v5", "wasm-bindgen"] }
wasm-bindgen = { version = "=0.2.58" }
wasm-bindgen-test = { version = "0.3.8" }
[build-dependencies]
basegl-build-utilities = { version = "0.1.0", path = "../../../build/utilities" }
bytes = { version = "0.5.4" }
futures = { version = "0.3.1" }
reqwest = { version = "0.10.1" }
tokio = { version = "0.2.10", features = ["macros"] }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
websocket = "0.23.0"

29
gui/run
View File

@ -1,7 +1,11 @@
#!/usr/bin/env node #!/usr/bin/env node
let cmd = require('./build/lib/cmd')
let fss = require('fs') const cmd = require('./build/cmd')
let fs = require('fs').promises const fs = require('fs').promises
const fss = require('fs')
const paths = require('./build/paths')
process.on('unhandledRejection', error => { throw(error) })
let args = process.argv.slice(2) let args = process.argv.slice(2)
@ -10,33 +14,24 @@ async function init () {
if(!args.includes(no_validation)) { if(!args.includes(no_validation)) {
await cmd.check_version('npm','6.13.4',{silent:true}) await cmd.check_version('npm','6.13.4',{silent:true})
await cmd.check_version('node','v12.16.1',{silent:true}) await cmd.check_version('node','v12.16.1',{silent:true})
await cmd.check_version('rustc','1.40.0-nightly',{preprocess:(v)=>v.substring(6,20),silent:true}) await cmd.check_version('rustc','1.40.0-nightly',{
preprocess:(v)=>v.substring(6,20),silent:true
})
} }
let initialized = fss.existsSync('target/.initialized') let initialized = fss.existsSync(paths.dist.init)
if (!initialized) { if (!initialized) {
cmd.section('Initialization') cmd.section('Initialization')
console.log('Installing build script dependencies.') console.log('Installing build script dependencies.')
await cmd.with_cwd('build', async () => { await cmd.with_cwd('build', async () => {
await cmd.run('npm',['install']) await cmd.run('npm',['install'])
}) })
if(args[0] == 'clean') {
try { await fs.unlink('target/.initialized') } catch {}
} else {
console.log('Installing application dependencies')
await cmd.with_cwd('app', async () => {
await cmd.run('npm',['run','install'])
})
await fs.mkdir('target', {recursive:true})
await fs.open('target/.initialized','w')
}
} }
} }
async function main() { async function main() {
await init() await init()
cmd.run('node',['./build/run'].concat(args)) cmd.run('node',[paths.script.run].concat(args))
} }
main() main()

View File

@ -1,5 +1,5 @@
node_modules node_modules
dist dist
generated
lerna-debug.log lerna-debug.log
*.lerna_backup *.lerna_backup
package.json

View File

@ -5,7 +5,7 @@
} }
}, },
"packages": [ "packages": [
"packages/*" "lib/*"
], ],
"version": "0.0.0" "version": "0.0.0"
} }

View File

@ -0,0 +1,68 @@
let config = {
name: "enso-studio-client",
description: "The standalone client for the Enso IDE.",
main: "index.js",
dependencies: {
"enso-studio-content": "2.0.0-alpha.0",
"enso-studio-common": "2.0.0-alpha.0",
"enso-studio-icons": "2.0.0-alpha.0",
"copy-webpack-plugin": "^5.1.1",
"create-servers": "^3.1.0",
"electron-is-dev": "^1.1.0"
},
devDependencies: {
"compression-webpack-plugin": "^3.1.0",
"copy-webpack-plugin": "^5.1.1",
"devtron": "^1.4.0",
"electron": "8.0.2",
"electron-builder": "^22.3.2"
},
scripts: {
"start": `electron ${paths.dist.content} -- `,
"build": "webpack ",
"dist": "electron-builder",
"dist:crossplatform": "electron-builder --mac --win --linux"
}
}
config.build = {
appId: "org.enso.studio",
productName: "Enso Studio",
copyright: "Copyright © 2020 ${author}.",
mac: {
icon: `${paths.dist.root}/icons/icon.icns`,
category: "public.app-category.developer-tools",
darkModeSupport: true,
type: "distribution"
},
win: {
icon: `${paths.dist.root}/icons/icon.ico`,
},
linux: {
icon: `${paths.dist.root}/icons/png`,
category: "Development"
},
files: [
{ from: paths.dist.content, to: "." }
],
fileAssociations: [
{
ext: "enso",
name: "Enso Source File",
role: "Editor"
},
{
ext: "enso-studio",
name: "Enso Studio Project",
role: "Editor"
}
],
directories: {
"output": paths.dist.client
}
}
module.exports = {config}

View File

@ -6,7 +6,7 @@ import * as minimist from 'minimist'
import * as path from 'path' import * as path from 'path'
import * as pkg from '../package.json' import * as pkg from '../package.json'
import * as rootCfg from '../../../package.json' import * as rootCfg from '../../../package.json'
import * as buildCfg from '../../../generated/build.json' import * as buildCfg from '../../../../../dist/build.json'
import * as Server from 'enso-studio-common/src/server' import * as Server from 'enso-studio-common/src/server'

View File

@ -0,0 +1,34 @@
const Copy = require('copy-webpack-plugin')
const path = require('path')
const thisPath = path.resolve(__dirname)
const root = path.resolve(thisPath,'..','..','..','..')
const distPath = path.resolve(root,'dist')
module.exports = {
entry: {
index: path.resolve(thisPath,'src','index.js'),
},
mode: 'production',
target: "electron-main",
output: {
path: path.resolve(distPath,'content'),
filename: '[name].js',
},
plugins: [
new Copy([
{
from : path.resolve(thisPath,'package.json'),
to : path.resolve(distPath,'content','package.json')
},
{
from : path.resolve(thisPath,'src','preload.js'),
to : path.resolve(distPath,'content','preload.js')
}
]),
],
performance: {
hints: false,
},
stats: 'minimal',
}

View File

@ -0,0 +1,5 @@
let config = {
name: "enso-studio-common",
}
module.exports = {config}

View File

@ -0,0 +1,17 @@
let config = {
name: "enso-studio-content",
scripts: {
"build": "webpack",
"watch": "webpack-dev-server"
},
dependencies: {
"enso-studio-common": "2.0.0-alpha.0",
"copy-webpack-plugin": "^5.1.1"
},
devDependencies: {
"compression-webpack-plugin": "^3.1.0",
"copy-webpack-plugin": "^5.1.1"
}
}
module.exports = {config}

View File

@ -1,16 +1,19 @@
const CopyWebpackPlugin = require('copy-webpack-plugin') const CopyWebpackPlugin = require('copy-webpack-plugin')
const CompressionPlugin = require('compression-webpack-plugin') const CompressionPlugin = require('compression-webpack-plugin')
const path = require('path') const path = require('path')
const root = path.resolve(__dirname)
const thisPath = path.resolve(__dirname)
const root = path.resolve(thisPath,'..','..','..','..')
const distPath = path.resolve(root,'dist')
const wasmPath = path.resolve(distPath,'wasm')
module.exports = { module.exports = {
entry: { entry: {
index: path.resolve(root,'src','index.js'), index: path.resolve(thisPath,'src','index.js'),
wasm_imports: './src/wasm_imports.js', wasm_imports: './src/wasm_imports.js',
}, },
output: { output: {
path: path.resolve(root,'dist','assets'), path: path.resolve(root,'dist','content','assets'),
filename: '[name].js', filename: '[name].js',
libraryTarget: 'umd', libraryTarget: 'umd',
}, },
@ -20,8 +23,8 @@ module.exports = {
plugins: [ plugins: [
new CompressionPlugin(), new CompressionPlugin(),
new CopyWebpackPlugin([ new CopyWebpackPlugin([
path.resolve(root,'src','index.html'), path.resolve(thisPath,'src','index.html'),
path.resolve(root,'..','..','generated','wasm','gui.wasm'), path.resolve(wasmPath,'gui.wasm'),
]), ]),
], ],
devServer: { devServer: {
@ -32,7 +35,7 @@ module.exports = {
}, },
resolve: { resolve: {
alias: { alias: {
wasm_rust_glue$: path.resolve(root,'..','..','generated','wasm','gui.js') wasm_rust_glue$: path.resolve(wasmPath,'gui.js')
} }
}, },
performance: { performance: {

View File

@ -0,0 +1,12 @@
let config = {
name: "enso-studio-icons",
scripts: {
"build": "node src/index.js"
},
devDependencies: {
"sharp": "^0.24.1",
"to-ico": "^1.1.5"
}
}
module.exports = {config}

View File

@ -308,23 +308,29 @@ const exec = require('child_process').exec;
const spawn = require('child_process').spawn; const spawn = require('child_process').spawn;
const toIco = require('to-ico') const toIco = require('to-ico')
const sharp = require("sharp") const sharp = require("sharp")
const path = require('path')
const thisPath = path.resolve(__dirname)
const root = path.resolve(thisPath,'..','..','..','..','..')
const distPath = path.resolve(root,'dist','icons')
const donePath = path.resolve(distPath,'init')
async function genIcons() { async function genIcons() {
let sizes = [16,32,64,128,256,512,1024] let sizes = [16,32,64,128,256,512,1024]
let win_sizes = [16,32,64,128,256] let win_sizes = [16,32,64,128,256]
if(fss.existsSync('dist/.initialized')) { if(fss.existsSync(donePath)) {
console.log("The 'dist/.initialized' file exists. Icons will not be regenerated.") console.log(`The ${donePath} file exists. Icons will not be regenerated.`)
return return
} }
console.log("Generating SVG icons.") console.log("Generating SVG icons.")
await fs.mkdir('dist/svg', {recursive:true}) await fs.mkdir(path.resolve(distPath,'svg'), {recursive:true})
await fs.mkdir('dist/png', {recursive:true}) await fs.mkdir(path.resolve(distPath,'png'), {recursive:true})
for (let size of sizes) { for (let size of sizes) {
let name = `icon_${size}x${size}.svg` let name = `icon_${size}x${size}.svg`
await fs.writeFile(`dist/svg/${name}`,exports.generateMinimalWhiteLogo(size,true)) await fs.writeFile(`${distPath}/svg/${name}`,exports.generateMinimalWhiteLogo(size,true))
} }
/// Please note that this function converts the SVG to PNG /// Please note that this function converts the SVG to PNG
@ -335,36 +341,36 @@ async function genIcons() {
for (let size of sizes) { for (let size of sizes) {
let inName = `icon_${size}x${size}.svg` let inName = `icon_${size}x${size}.svg`
let outName = `icon_${size}x${size}.png` let outName = `icon_${size}x${size}.png`
await sharp(`dist/svg/${inName}`,{density:144}).png().resize({ await sharp(`${distPath}/svg/${inName}`,{density:144}).png().resize({
width : size, width : size,
kernel : sharp.kernel.mitchell kernel : sharp.kernel.mitchell
}).toFile(`dist/png/${outName}`) }).toFile(`${distPath}/png/${outName}`)
} }
for (let size of sizes.slice(1)) { for (let size of sizes.slice(1)) {
let size2 = size / 2 let size2 = size / 2
let inName = `icon_${size}x${size}.svg` let inName = `icon_${size}x${size}.svg`
let outName = `icon_${size2}x${size2}@2x.png` let outName = `icon_${size2}x${size2}@2x.png`
await sharp(`dist/svg/${inName}`,{density:144}).png().resize({ await sharp(`${distPath}/svg/${inName}`,{density:144}).png().resize({
width : size, width : size,
kernel : sharp.kernel.mitchell kernel : sharp.kernel.mitchell
}).toFile(`dist/png/${outName}`) }).toFile(`${distPath}/png/${outName}`)
} }
console.log("Generating ICNS.") console.log("Generating ICNS.")
exec(`cp -R dist/png dist/png.iconset`) exec(`cp -R ${distPath}/png ${distPath}/png.iconset`)
exec(`iconutil --convert icns --output dist/icon.icns dist/png.iconset`) exec(`iconutil --convert icns --output ${distPath}/icon.icns ${distPath}/png.iconset`)
console.log("Generating ICO.") console.log("Generating ICO.")
let files = [] let files = []
for (let size of win_sizes) { for (let size of win_sizes) {
let inName = `icon_${size}x${size}.png` let inName = `icon_${size}x${size}.png`
let data = await fs.readFile(`dist/png/${inName}`) let data = await fs.readFile(`${distPath}/png/${inName}`)
files.push(data) files.push(data)
} }
toIco(files).then(buf => { fss.writeFileSync('dist/icon.ico', buf) }) toIco(files).then(buf => { fss.writeFileSync(`${distPath}/icon.ico`, buf) })
await fs.open('dist/.initialized','w') await fs.open(donePath,'w')
} }
genIcons() genIcons()

View File

@ -1,6 +1,6 @@
{ {
"name": "root", "name": "root",
"version": "1.0.0", "version": "2.0.0-alpha.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@ -3398,9 +3398,9 @@
} }
}, },
"minimist": { "minimist": {
"version": "1.2.4", "version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.4.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-wTiNDqe4D2rbTJGZk1qcdZgFtY0/r+iuE6GDT7V0/+Gu5MLpIDm4+CssDECR79OJs/OxLPXMzdxy153b5Qy3hg==", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true "dev": true
}, },
"readable-stream": { "readable-stream": {
@ -4094,9 +4094,9 @@
}, },
"dependencies": { "dependencies": {
"@types/node": { "@types/node": {
"version": "12.12.29", "version": "12.12.30",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.29.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.30.tgz",
"integrity": "sha512-yo8Qz0ygADGFptISDj3pOC9wXfln/5pQaN/ysDIzOaAWXt73cNHmtEC8zSO2Y+kse/txmwIAJzkYZ5fooaS5DQ==" "integrity": "sha512-sz9MF/zk6qVr3pAnM0BSQvYIBK44tS75QC5N+VbWSE4DjCV/pJ+UzCW/F+vVnl7TkOPcuwQureKNtSSwjBTaMg=="
} }
} }
}, },
@ -5859,9 +5859,9 @@
} }
}, },
"minimist": { "minimist": {
"version": "1.2.4", "version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.4.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-wTiNDqe4D2rbTJGZk1qcdZgFtY0/r+iuE6GDT7V0/+Gu5MLpIDm4+CssDECR79OJs/OxLPXMzdxy153b5Qy3hg==", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true "dev": true
}, },
"parse-json": { "parse-json": {
@ -6021,9 +6021,9 @@
} }
}, },
"minimist": { "minimist": {
"version": "1.2.4", "version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.4.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-wTiNDqe4D2rbTJGZk1qcdZgFtY0/r+iuE6GDT7V0/+Gu5MLpIDm4+CssDECR79OJs/OxLPXMzdxy153b5Qy3hg==", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true "dev": true
} }
} }
@ -6074,9 +6074,9 @@
} }
}, },
"minimist": { "minimist": {
"version": "1.2.4", "version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.4.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-wTiNDqe4D2rbTJGZk1qcdZgFtY0/r+iuE6GDT7V0/+Gu5MLpIDm4+CssDECR79OJs/OxLPXMzdxy153b5Qy3hg==", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true "dev": true
} }
} }
@ -8088,9 +8088,9 @@
"dev": true "dev": true
}, },
"node-fetch-npm": { "node-fetch-npm": {
"version": "2.0.2", "version": "2.0.3",
"resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz", "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.3.tgz",
"integrity": "sha512-nJIxm1QmAj4v3nfCvEeCrYSoVwXyxLnaPBK5W1W5DGEJwjlKuC2VEUycGw5oxk+4zZahRrB84PUJJgEmhFTDFw==", "integrity": "sha512-DgwoKEsqLnFZtk3ap7GWBHcHwnUhsNmQqEDcdjfQ8GofLEFJ081NAd4Uin3R7RFZBWVJCwHISw1oaEqPgSLloA==",
"dev": true, "dev": true,
"requires": { "requires": {
"encoding": "^0.1.11", "encoding": "^0.1.11",
@ -8969,9 +8969,9 @@
}, },
"dependencies": { "dependencies": {
"minimist": { "minimist": {
"version": "1.2.4", "version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.4.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-wTiNDqe4D2rbTJGZk1qcdZgFtY0/r+iuE6GDT7V0/+Gu5MLpIDm4+CssDECR79OJs/OxLPXMzdxy153b5Qy3hg==" "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
} }
} }
}, },
@ -9210,9 +9210,9 @@
}, },
"dependencies": { "dependencies": {
"minimist": { "minimist": {
"version": "1.2.4", "version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.4.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-wTiNDqe4D2rbTJGZk1qcdZgFtY0/r+iuE6GDT7V0/+Gu5MLpIDm4+CssDECR79OJs/OxLPXMzdxy153b5Qy3hg==" "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
} }
} }
}, },
@ -9261,9 +9261,9 @@
} }
}, },
"minimist": { "minimist": {
"version": "1.2.4", "version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.4.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-wTiNDqe4D2rbTJGZk1qcdZgFtY0/r+iuE6GDT7V0/+Gu5MLpIDm4+CssDECR79OJs/OxLPXMzdxy153b5Qy3hg==" "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
} }
} }
}, },
@ -10708,9 +10708,9 @@
}, },
"dependencies": { "dependencies": {
"minimist": { "minimist": {
"version": "1.2.4", "version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.4.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-wTiNDqe4D2rbTJGZk1qcdZgFtY0/r+iuE6GDT7V0/+Gu5MLpIDm4+CssDECR79OJs/OxLPXMzdxy153b5Qy3hg==", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true "dev": true
} }
} }
@ -12213,9 +12213,9 @@
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
}, },
"yargs": { "yargs": {
"version": "14.2.2", "version": "14.2.3",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.2.tgz", "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz",
"integrity": "sha512-/4ld+4VV5RnrynMhPZJ/ZpOCGSCeghMykZ3BhdFBDa9Wy/RH6uEGNWDJog+aUlq+9OM1CFTgtYRW5Is1Po9NOA==", "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==",
"dev": true, "dev": true,
"requires": { "requires": {
"cliui": "^5.0.0", "cliui": "^5.0.0",
@ -12228,7 +12228,7 @@
"string-width": "^3.0.0", "string-width": "^3.0.0",
"which-module": "^2.0.0", "which-module": "^2.0.0",
"y18n": "^4.0.0", "y18n": "^4.0.0",
"yargs-parser": "^15.0.0" "yargs-parser": "^15.0.1"
}, },
"dependencies": { "dependencies": {
"ansi-regex": { "ansi-regex": {
@ -12266,9 +12266,9 @@
} }
}, },
"yargs-parser": { "yargs-parser": {
"version": "15.0.0", "version": "15.0.1",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.0.tgz", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz",
"integrity": "sha512-xLTUnCMc4JhxrPEPUYD5IBR1mWCK/aT6+RJ/K29JY2y1vD+FhtgKK0AXRWvI262q3QSffAQuTouFIKUuHX89wQ==", "integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==",
"dev": true, "dev": true,
"requires": { "requires": {
"camelcase": "^5.0.0", "camelcase": "^5.0.0",

21
gui/src/js/package.js Normal file
View File

@ -0,0 +1,21 @@
let config = {
name: "root",
version: "2.0.0-alpha.0",
private: true,
devDependencies: {
"lerna": "^3.20.2",
"webpack": "^4.42.0",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.1.5"
},
scripts: {
"build": "lerna run build --stream",
"clean": "rm -Rf node_modules && lerna clean -y",
"dist": "lerna run build --stream && lerna run dist --stream",
"install": "npm install lerna && lerna bootstrap",
"start": "npm run build && lerna run start --stream -- -- ",
"watch": "lerna run watch --stream"
}
}
module.exports = {config}

7
gui/src/rust/.gitignore vendored Normal file
View File

@ -0,0 +1,7 @@
# Rust
target
**/*.rs.bk
# A thirdparty downloaded js
/ensogl/msdf-sys/msdfgen_wasm.js
/ide/parser/pkg/

View File

@ -138,89 +138,6 @@ name = "base64"
version = "0.11.0" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "basegl"
version = "0.1.0"
dependencies = [
"Inflector 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)",
"basegl-core-embedded-fonts 0.1.0",
"basegl-core-msdf-sys 0.1.0",
"basegl-system-web 0.1.0",
"bit_field 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"code-builder 0.1.0",
"console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"data 0.1.0",
"enso-frp 0.1.0",
"enso-prelude 0.1.0",
"enum_dispatch 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"eval-tt 0.1.0",
"failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)",
"logger 0.1.0",
"nalgebra 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
"num_enum 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"optics 0.1.0",
"palette 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"paste 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-hash 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"shapely 0.1.0",
"shrinkwraprs 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen-test 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)",
"web-test 0.1.0",
]
[[package]]
name = "basegl-build-utilities"
version = "0.1.0"
dependencies = [
"download-lp 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"path-clean 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "basegl-core-embedded-fonts"
version = "0.1.0"
dependencies = [
"basegl-build-utilities 0.1.0",
"enso-prelude 0.1.0",
"zip 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "basegl-core-msdf-sys"
version = "0.1.0"
dependencies = [
"basegl-build-utilities 0.1.0",
"basegl-core-embedded-fonts 0.1.0",
"enso-prelude 0.1.0",
"futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)",
"nalgebra 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen-test 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "basegl-system-web"
version = "0.1.0"
dependencies = [
"console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"data 0.1.0",
"enso-prelude 0.1.0",
"failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)",
"logger 0.1.0",
"nalgebra 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen-test 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "bit_field" name = "bit_field"
version = "0.10.0" version = "0.10.0"
@ -565,8 +482,8 @@ dependencies = [
name = "enso-frp" name = "enso-frp"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"basegl-system-web 0.1.0",
"enso-prelude 0.1.0", "enso-prelude 0.1.0",
"ensogl-system-web 0.1.0",
"keyboard-types 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "keyboard-types 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rust-dense-bitset 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rust-dense-bitset 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -592,6 +509,89 @@ dependencies = [
"weak-table 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "weak-table 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "ensogl"
version = "0.1.0"
dependencies = [
"Inflector 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)",
"bit_field 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"code-builder 0.1.0",
"console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"data 0.1.0",
"enso-frp 0.1.0",
"enso-prelude 0.1.0",
"ensogl-core-embedded-fonts 0.1.0",
"ensogl-core-msdf-sys 0.1.0",
"ensogl-system-web 0.1.0",
"enum_dispatch 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"eval-tt 0.1.0",
"failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)",
"logger 0.1.0",
"nalgebra 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
"num_enum 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"optics 0.1.0",
"palette 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"paste 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-hash 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"shapely 0.1.0",
"shrinkwraprs 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen-test 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)",
"web-test 0.1.0",
]
[[package]]
name = "ensogl-build-utilities"
version = "0.1.0"
dependencies = [
"download-lp 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"path-clean 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "ensogl-core-embedded-fonts"
version = "0.1.0"
dependencies = [
"enso-prelude 0.1.0",
"ensogl-build-utilities 0.1.0",
"zip 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "ensogl-core-msdf-sys"
version = "0.1.0"
dependencies = [
"enso-prelude 0.1.0",
"ensogl-build-utilities 0.1.0",
"ensogl-core-embedded-fonts 0.1.0",
"futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)",
"nalgebra 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen-test 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "ensogl-system-web"
version = "0.1.0"
dependencies = [
"console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"data 0.1.0",
"enso-prelude 0.1.0",
"failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)",
"logger 0.1.0",
"nalgebra 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen-test 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "enum_dispatch" name = "enum_dispatch"
version = "0.2.1" version = "0.2.1"
@ -861,11 +861,11 @@ dependencies = [
name = "gui" name = "gui"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"basegl 0.1.0",
"basegl-core-msdf-sys 0.1.0",
"basegl-system-web 0.1.0",
"enso-frp 0.1.0", "enso-frp 0.1.0",
"enso-prelude 0.1.0", "enso-prelude 0.1.0",
"ensogl 0.1.0",
"ensogl-core-msdf-sys 0.1.0",
"ensogl-system-web 0.1.0",
"ide 0.1.0", "ide 0.1.0",
"js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)",
"nalgebra 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", "nalgebra 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1068,13 +1068,13 @@ name = "ide"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"ast 0.1.0", "ast 0.1.0",
"basegl 0.1.0",
"basegl-core-msdf-sys 0.1.0",
"basegl-system-web 0.1.0",
"console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"data 0.1.0", "data 0.1.0",
"enso-frp 0.1.0", "enso-frp 0.1.0",
"enso-prelude 0.1.0", "enso-prelude 0.1.0",
"ensogl 0.1.0",
"ensogl-core-msdf-sys 0.1.0",
"ensogl-system-web 0.1.0",
"failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"file-manager-client 0.1.0", "file-manager-client 0.1.0",
"flo_stream 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "flo_stream 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1660,11 +1660,11 @@ name = "parser"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"ast 0.1.0", "ast 0.1.0",
"basegl-build-utilities 0.1.0",
"bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"data 0.1.0", "data 0.1.0",
"enso-prelude 0.1.0", "enso-prelude 0.1.0",
"ensogl-build-utilities 0.1.0",
"failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2935,9 +2935,9 @@ dependencies = [
name = "web-test" name = "web-test"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"basegl 0.1.0",
"basegl-system-web 0.1.0",
"enso-prelude 0.1.0", "enso-prelude 0.1.0",
"ensogl 0.1.0",
"ensogl-system-web 0.1.0",
"js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)",
"shrinkwraprs 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "shrinkwraprs 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",

View File

@ -1,23 +1,24 @@
[workspace] [workspace]
members = [ members = [
"build/utilities", "build",
"ensogl",
"ensogl/embedded-fonts",
"ensogl/msdf-sys",
"ide",
"ide/ast/impl",
"ide/ast/macros",
"ide/file-manager",
"ide/file-manager/mock-server",
"ide/json-rpc",
"ide/parser",
"ide/utils",
"lib/code-builder", "lib/code-builder",
"lib/core",
"lib/core/embedded-fonts",
"lib/core/msdf-sys",
"lib/data", "lib/data",
"lib/debug-scenes",
"lib/eval-tt", "lib/eval-tt",
"lib/frp", "lib/frp",
"lib/gui",
"lib/ide/ast/impl",
"lib/ide/ast/macros",
"lib/ide/file-manager",
"lib/ide/file-manager/mock-server",
"lib/ide/",
"lib/ide/json-rpc",
"lib/ide/parser",
"lib/ide/utils",
"lib/logger", "lib/logger",
"lib/macro-utils", "lib/macro-utils",
"lib/optics", "lib/optics",

View File

@ -1,5 +1,5 @@
[package] [package]
name = "basegl-build-utilities" name = "ensogl-build-utilities"
version = "0.1.0" version = "0.1.0"
authors = ["Enso Team <contact@luna-lang.org>"] authors = ["Enso Team <contact@luna-lang.org>"]
edition = "2018" edition = "2018"

View File

@ -1,5 +1,5 @@
[package] [package]
name = "basegl" name = "ensogl"
version = "0.1.0" version = "0.1.0"
authors = ["Enso Team <contact@luna-lang.org>"] authors = ["Enso Team <contact@luna-lang.org>"]
edition = "2018" edition = "2018"
@ -13,17 +13,17 @@ statistics = []
no_unboxed_callbacks = [] no_unboxed_callbacks = []
[dependencies] [dependencies]
basegl-core-embedded-fonts = { version = "0.1.0" , path = "embedded-fonts" } ensogl-core-embedded-fonts = { version = "0.1.0" , path = "embedded-fonts" }
basegl-core-msdf-sys = { version = "0.1.0" , path = "msdf-sys" } ensogl-core-msdf-sys = { version = "0.1.0" , path = "msdf-sys" }
enso-prelude = { version = "0.1.0" , path = "../prelude" } enso-prelude = { version = "0.1.0" , path = "../lib/prelude" }
basegl-system-web = { version = "0.1.0" , path = "../system/web" } ensogl-system-web = { version = "0.1.0" , path = "../lib/system/web" }
code-builder = { version = "0.1.0" , path = "../code-builder" } code-builder = { version = "0.1.0" , path = "../lib/code-builder" }
data = { version = "0.1.0" , path = "../data" } data = { version = "0.1.0" , path = "../lib/data" }
enso-frp = { version = "0.1.0" , path = "../frp" } enso-frp = { version = "0.1.0" , path = "../lib/frp" }
eval-tt = { version = "0.1.0" , path = "../eval-tt" } eval-tt = { version = "0.1.0" , path = "../lib/eval-tt" }
logger = { version = "0.1.0" , path = "../logger" } logger = { version = "0.1.0" , path = "../lib/logger" }
optics = { version = "0.1.0" , path = "../optics" } optics = { version = "0.1.0" , path = "../lib/optics" }
shapely = { version = "0.1.0" , path = "../shapely/impl" } shapely = { version = "0.1.0" , path = "../lib/shapely/impl" }
bit_field = { version = "0.10.0" } bit_field = { version = "0.10.0" }
console_error_panic_hook = { version = "0.1.6" } console_error_panic_hook = { version = "0.1.6" }
@ -40,8 +40,8 @@ rustc-hash = { version = "1.0.1" }
shrinkwraprs = { version = "0.3.0" } shrinkwraprs = { version = "0.3.0" }
smallvec = { version = "1.0.0" } smallvec = { version = "1.0.0" }
typenum = { version = "1.11.2" } typenum = { version = "1.11.2" }
# We require exact version of wasm-bindgen because we do patching final js in our build process, and this is vulnerable # We require exact version of wasm-bindgen because we do patching final js in our build process,
# to any wasm-bindgen version change. # and this is vulnerable to any wasm-bindgen version change.
wasm-bindgen = { version = "=0.2.58" , features = ["nightly"] } wasm-bindgen = { version = "=0.2.58" , features = ["nightly"] }
[dependencies.web-sys] [dependencies.web-sys]
@ -83,4 +83,4 @@ features = [
[dev-dependencies] [dev-dependencies]
wasm-bindgen-test = { version = "0.3.8" } wasm-bindgen-test = { version = "0.3.8" }
web-test = { version = "0.1.0", path = "../web-test" } web-test = { version = "0.1.0", path = "../lib/web-test" }

View File

@ -1,5 +1,5 @@
[package] [package]
name = "basegl-core-embedded-fonts" name = "ensogl-core-embedded-fonts"
version = "0.1.0" version = "0.1.0"
authors = ["Enso Team <contact@luna-lang.org>"] authors = ["Enso Team <contact@luna-lang.org>"]
edition = "2018" edition = "2018"
@ -10,8 +10,8 @@ crate-type = ["cdylib", "rlib"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
enso-prelude = { version = "0.1.0", path="../../prelude"} enso-prelude = { version = "0.1.0", path="../../lib/prelude"}
[build-dependencies] [build-dependencies]
basegl-build-utilities = { version = "0.1.0", path="../../../build/utilities" } ensogl-build-utilities = { version = "0.1.0", path="../../build" }
zip = "0.5" zip = "0.5"

View File

@ -38,7 +38,7 @@ mod deja_vu {
use crate::FillMapRsFile; use crate::FillMapRsFile;
use std::path; use std::path;
use basegl_build_utilities::GithubRelease; use ensogl_build_utilities::GithubRelease;
pub const PACKAGE : GithubRelease<&str> = GithubRelease { pub const PACKAGE : GithubRelease<&str> = GithubRelease {
project_url : "https://github.com/dejavu-fonts/dejavu-fonts/", project_url : "https://github.com/dejavu-fonts/dejavu-fonts/",

View File

@ -0,0 +1,22 @@
[package]
name = "ensogl-core-msdf-sys"
version = "0.1.0"
authors = ["Enso Team <contact@luna-lang.org>"]
edition = "2018"
[lib]
crate-type = ["cdylib", "rlib"]
[dependencies]
wasm-bindgen = { version = "=0.2.58" }
js-sys = { version = "0.3.30" }
nalgebra = { version = "0.19.0" }
enso-prelude = { version = "0.1.0", path="../../lib/prelude" }
[dev-dependencies]
wasm-bindgen-test = { version = "0.3.8" }
futures = { version = "0.3.1" }
ensogl-core-embedded-fonts = { version = "0.1.0", path="../embedded-fonts" }
[build-dependencies]
ensogl-build-utilities = { version = "0.1.0", path="../../build" }

View File

@ -1,6 +1,6 @@
mod msdfgen_wasm { mod msdfgen_wasm {
use basegl_build_utilities::GithubRelease; use ensogl_build_utilities::GithubRelease;
use std::{path,fs}; use std::{path,fs};
use std::io::Write; use std::io::Write;

View File

@ -213,7 +213,7 @@ impl Drop for MultichannelSignedDistanceField {
mod tests { mod tests {
use super::*; use super::*;
use basegl_core_embedded_fonts::EmbeddedFonts; use ensogl_core_embedded_fonts::EmbeddedFonts;
use nalgebra::Vector2; use nalgebra::Vector2;
use wasm_bindgen_test::wasm_bindgen_test; use wasm_bindgen_test::wasm_bindgen_test;
use wasm_bindgen_test::wasm_bindgen_test_configure; use wasm_bindgen_test::wasm_bindgen_test_configure;

Some files were not shown because too many files have changed in this diff Show More