From 150fdf505511327f486a8a1c8fed9561887c3fb4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= <joamag@gmail.com>
Date: Mon, 20 Jun 2022 20:17:18 +0100
Subject: [PATCH] feat: added building of wasm

---
 .gitlab-ci.yml         | 15 +++++++++++++++
 examples/web/index.css |  2 +-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4d07290..6873596 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -19,3 +19,18 @@ build-rust:
     - rustc --version
     - cargo build
     - cargo build --release
+
+build-wasm:
+  stage: build
+  parallel:
+    matrix:
+      - RUST_VERSION: ["1.60.0"]
+  script:
+    - rustup toolchain install $RUST_VERSION
+    - rustup override set $RUST_VERSION
+    - rustc --version
+    - cargo install wasm-pack
+    - wasm-pack build --release --target=web --out-dir=examples/web/lib -- --features wasm
+  artifacts:
+    paths:
+      - examples/web
diff --git a/examples/web/index.css b/examples/web/index.css
index fa141e3..cf03ee7 100644
--- a/examples/web/index.css
+++ b/examples/web/index.css
@@ -64,7 +64,7 @@ p {
 }
 
 .main > .side-left .canvas-container > .canvas {
-    margin-top: 72px;
+    margin-top: 76px;
     border: 2px solid #50cb93;
     padding: 8px 8px 8px 8px;
     background-color: #1b1a17;
-- 
GitLab