diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index c340cdd..636bb2f 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -160,3 +160,25 @@ jobs:
artifacts: "builds/majestic-lisp-x86_64.tar.gz,builds/majestic-lisp-win64.zip,builds/majestic-lisp-wasm32-wasi.tar.gz"
token: ${{ secrets.GITHUB_TOKEN }}
+ wapm-release:
+ # Run only for tags
+ if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
+ runs-on: ubuntu-latest
+ needs: [deploy-wasi]
+ steps:
+ - name: Checkout Repo
+ uses: actions/checkout@v3
+ - name: Recover artifacts
+ uses: actions/download-artifact@v2
+ - name: Reposition generated WASM file
+ run: |
+ mkdir -p target/wasm32-wasi/release/
+ tar zxvf builds/majestic-lisp-wasm32-wasi.tar.gz
+ mv majestic-lisp.wasm target/wasm32-wasi/release/
+ - name: Setup Wasmer
+ uses: wasmerio/setup-wasmer@v1
+ - name: Publish to WAPM
+ uses: wasmerio/wapm-publish@v1
+ with:
+ username: ${{ secrets.WAPM_USERNAME }}
+ password: ${{ secrets.WAPM_PASSWORD }}
diff --git a/.gitignore b/.gitignore
index 478522f..5035b28 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,5 @@ target/
.majestic_history
test-streams-in.txt
test-streams-out.txt
+
+wapm_packages
\ No newline at end of file
diff --git a/03-configuracao.org b/03-configuracao.org
index b0e9f79..ce8eb99 100644
--- a/03-configuracao.org
+++ b/03-configuracao.org
@@ -69,8 +69,8 @@ ferramenta ~cargo~.
#+begin_src toml :tangle Cargo.toml
[package]
name = "majestic-lisp"
-version = "0.4.0"
-authors = ["Lucas Vieira "]
+version = "0.4.2"
+authors = ["Lucas S. Vieira "]
description = "Lisp dialect built with Rust as a literate program"
license = "MIT"
keywords = ["lisp", "language", "dialect", "interpreter"]
@@ -114,6 +114,36 @@ arquivo ~rust-toolchain~:
nightly
#+end_src
+* Configuração para exportação de WebAssembly
+
+A configuração a seguir (arquivo ~wapm.toml~) determina a configuração
+necessária para a publicação do pacote do Majestic Lisp no [[https://wapm.io/][WAPM.io]]. Dessa forma,
+o projeto poderá também ser utilizado no [[https://webassembly.sh/][WebAssembly.sh]].
+
+#+begin_src toml :tangle wapm.toml
+[package]
+name = "luksamuk/majestic-lisp"
+version = "0.4.2"
+description = "Lisp dialect built with Rust as a literate program"
+license = "MIT"
+license-file = "LICENSE"
+repository = "https://github.com/luksamuk/majestic-lisp"
+wasmer-extra-flags = "--enable-bulk-memory"
+
+[[module]]
+name = "majestic"
+source = "./target/wasm32-wasi/release/majestic-lisp.wasm"
+abi = "wasi"
+
+[module.interfaces]
+wasi = "0.1.0-unstable"
+
+[[command]]
+name = "majestic"
+module = "majestic"
+package = "luksamuk/majestic-lisp"
+#+end_src
+
* Compilação
Para compilarmos o projeto, podemos criar um arquivo ~Makefile~ que
diff --git a/C-manpage.org b/C-manpage.org
index 05e7648..a4c4b28 100644
--- a/C-manpage.org
+++ b/C-manpage.org
@@ -17,7 +17,7 @@ Manual do ~troff~[fn:1].
#+begin_src nroff
.\" Majestic Lisp manpage
.\" Copyright (c) 2020-2021 Lucas S. Vieira
-.TH majestic 1 "Updated 2022-10-24" "majestic-0.4.0" "MAJESTIC"
+.TH majestic 1 "Updated 2022-10-25" "majestic-0.4.2" "MAJESTIC"
#+end_src
** Nome
diff --git a/Cargo.toml b/Cargo.toml
index ca6fb39..4f4fd87 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "majestic-lisp"
-version = "0.4.0"
-authors = ["Lucas Vieira "]
+version = "0.4.2"
+authors = ["Lucas S. Vieira "]
description = "Lisp dialect built with Rust as a literate program"
license = "MIT"
keywords = ["lisp", "language", "dialect", "interpreter"]
diff --git a/doc/html/03-configuracao.html b/doc/html/03-configuracao.html
index 114375b..ee6eb59 100644
--- a/doc/html/03-configuracao.html
+++ b/doc/html/03-configuracao.html
@@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
+
Configurando o projeto
@@ -289,8 +289,8 @@ 2. Configurando a crat
[package]
name = "majestic-lisp"
-version = "0.4.0"
-authors = ["Lucas Vieira <lucasvieira@protonmail.com>"]
+version = "0.4.2"
+authors = ["Lucas S. Vieira <lucasvieira@protonmail.com>"]
description = "Lisp dialect built with Rust as a literate program"
license = "MIT"
keywords = ["lisp", "language", "dialect", "interpreter"]
@@ -340,10 +340,46 @@ 2. Configurando a crat
-
-
3. Compilação
+
+
3. Configuração para exportação de WebAssembly
+A configuração a seguir (arquivo wapm.toml
) determina a configuração
+necessária para a publicação do pacote do Majestic Lisp no WAPM.io. Dessa forma,
+o projeto poderá também ser utilizado no WebAssembly.sh.
+
+
+
+
[package]
+name = "luksamuk/majestic-lisp"
+version = "0.4.2"
+description = "Lisp dialect built with Rust as a literate program"
+license = "MIT"
+license-file = "LICENSE"
+repository = "https://github.com/luksamuk/majestic-lisp"
+wasmer-extra-flags = "--enable-bulk-memory"
+
+[[module]]
+name = "majestic"
+source = "./target/wasm32-wasi/release/majestic-lisp.wasm"
+abi = "wasi"
+
+[module.interfaces]
+wasi = "0.1.0-unstable"
+
+[[command]]
+name = "majestic"
+module = "majestic"
+package = "luksamuk/majestic-lisp"
+
+
+
+
+
+
+
4. Compilação
+
+
Para compilarmos o projeto, podemos criar um arquivo Makefile
que
acelerará esse processo.
@@ -484,7 +520,7 @@
Author: Lucas S. Vieira
-
Created: 2022-10-24 seg 00:26
+
Created: 2022-10-25 ter 00:14
Validate
diff --git a/doc/html/09-ponto-de-entrada.html b/doc/html/09-ponto-de-entrada.html
index 4504cb7..a31483a 100644
--- a/doc/html/09-ponto-de-entrada.html
+++ b/doc/html/09-ponto-de-entrada.html
@@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
+
Ponto de Entrada
@@ -683,7 +683,7 @@
6. Função main
Author: Lucas S. Vieira
-
Created: 2022-10-24 seg 13:30
+
Created: 2022-10-25 ter 00:14
Validate
diff --git a/doc/html/C-manpage.html b/doc/html/C-manpage.html
index 453c43d..85584e3 100644
--- a/doc/html/C-manpage.html
+++ b/doc/html/C-manpage.html
@@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
+
Apêndice C: Manpage
@@ -229,7 +229,7 @@ 1.1. Cabeçalho
.\" Majestic Lisp manpage
.\" Copyright (c) 2020-2021 Lucas S. Vieira
-.TH majestic 1 "Updated 2022-10-24" "majestic-0.4.0" "MAJESTIC"
+.TH majestic 1 "Updated 2022-10-25" "majestic-0.4.2" "MAJESTIC"
@@ -505,7 +505,7 @@
Author: Lucas S. Vieira
-
Created: 2022-10-24 seg 13:30
+
Created: 2022-10-25 ter 00:14
Validate
diff --git a/doc/html/index.html b/doc/html/index.html
index 474068a..258717a 100644
--- a/doc/html/index.html
+++ b/doc/html/index.html
@@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
+
Majestic Lisp
@@ -244,6 +244,27 @@ Majestic Lisp
deverá ser editado diretamente.
+
+
Execução do projeto no browser
+
+
+NOVO! Você poderá agora executar o projeto em sua versão mais estável através
+do WebAssembly.sh. Para tanto, acesse o site e, no console que abre, digite:
+
+
+
+
wapm install luksamuk/majestic-lisp
+majestic
+
+
+
+
+O projeto ainda é um pouco delicado, e por enquanto pede input através de uma
+janela no console, mas você poderá utilizá-lo como teste.
+
+
+
+
Licenciamento
@@ -323,7 +344,7 @@
Apêndices
Author: Lucas S. Vieira
-
Created: 2022-10-24 seg 00:41
+
Created: 2022-10-25 ter 00:16
Validate
diff --git a/index.org b/index.org
index 7b58173..bcba608 100644
--- a/index.org
+++ b/index.org
@@ -26,6 +26,22 @@ Você poderá encontrar o código separado [[https://github.com/luksamuk/majest
certifique-se de que *editar apenas os arquivos .org*; nenhum arquivo de código
deverá ser editado diretamente.
+* Execução do projeto no browser
+:PROPERTIES:
+:UNNUMBERED: t
+:END:
+
+*NOVO!* Você poderá agora executar o projeto em sua versão mais estável através
+do [[https://webassembly.sh][WebAssembly.sh]]. Para tanto, acesse o site e, no console que abre, digite:
+
+#+begin_src bash :tangle no :eval no
+wapm install luksamuk/majestic-lisp
+majestic
+#+end_src
+
+O projeto ainda é um pouco delicado, e por enquanto pede input através de uma
+janela no console, mas você poderá utilizá-lo como teste.
+
* Licenciamento
:PROPERTIES:
:UNNUMBERED: t
diff --git a/man/man1/majestic.1 b/man/man1/majestic.1
index 4100016..94a0294 100644
--- a/man/man1/majestic.1
+++ b/man/man1/majestic.1
@@ -1,6 +1,6 @@
.\" Majestic Lisp manpage
.\" Copyright (c) 2020-2021 Lucas S. Vieira
-.TH majestic 1 "Updated 2022-10-24" "majestic-0.4.0" "MAJESTIC"
+.TH majestic 1 "Updated 2022-10-25" "majestic-0.4.2" "MAJESTIC"
.SH "NAME"
.P
majestic \- \fIMajestic Lisp Interpreter\fP
diff --git a/wapm.lock b/wapm.lock
new file mode 100644
index 0000000..e3c7d5b
--- /dev/null
+++ b/wapm.lock
@@ -0,0 +1,18 @@
+# Lockfile v4
+# This file is automatically generated by Wapm.
+# It is not intended for manual editing. The schema of this file may change.
+[modules."luksamuk/majestic-lisp"."0.4.2".majestic]
+name = "majestic"
+package_version = "0.4.2"
+package_name = "luksamuk/majestic-lisp"
+package_path = "luksamuk/majestic-lisp@0.4.2"
+resolved = "local"
+resolved_source = "local"
+abi = "wasi"
+source = "./target/wasm32-wasi/release/majestic-lisp.wasm"
+[commands.majestic]
+name = "majestic"
+package_name = "luksamuk/majestic-lisp"
+package_version = "0.4.2"
+module = "majestic"
+is_top_level_dependency = true
diff --git a/wapm.toml b/wapm.toml
new file mode 100644
index 0000000..a7cc99f
--- /dev/null
+++ b/wapm.toml
@@ -0,0 +1,21 @@
+[package]
+name = "luksamuk/majestic-lisp"
+version = "0.4.2"
+description = "Lisp dialect built with Rust as a literate program"
+license = "MIT"
+license-file = "LICENSE"
+repository = "https://github.com/luksamuk/majestic-lisp"
+wasmer-extra-flags = "--enable-bulk-memory"
+
+[[module]]
+name = "majestic"
+source = "./target/wasm32-wasi/release/majestic-lisp.wasm"
+abi = "wasi"
+
+[module.interfaces]
+wasi = "0.1.0-unstable"
+
+[[command]]
+name = "majestic"
+module = "majestic"
+package = "luksamuk/majestic-lisp"