commit 4605b386fc97f36fa453faac5c4f8edd2cb70f2b Author: Hauke D Date: Thu Aug 9 12:19:46 2018 +0200 Initial commit of WebPerl site diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6acca6e --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/web/ +/work/ +/emperl5/ diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..5cc05e1 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +webperl.zero-g.net \ No newline at end of file diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..2e5adb1 --- /dev/null +++ b/_config.yml @@ -0,0 +1,5 @@ +theme: jekyll-theme-minimal +title: WebPerl +description: Run Perl in the browser with WebPerl! +logo: webperl.png +show_downloads: false diff --git a/building.md b/building.md new file mode 100644 index 0000000..ca4ba81 --- /dev/null +++ b/building.md @@ -0,0 +1,15 @@ + +🕸️🐪 Building WebPerl +=================== + +\[ [Home](index.html) - +[Using WebPerl](using.html) - +[Building WebPerl](building.html) - +[Wiki](https://github.com/haukex/webperl/wiki) - +[GitHub](https://github.com/haukex/webperl) - +[Notes](notes.html) - +[Legal](legal.html) \] + + +Nothing here yet. + diff --git a/index.md b/index.md new file mode 100644 index 0000000..d1556e8 --- /dev/null +++ b/index.md @@ -0,0 +1,34 @@ + +🕸️🐪 Welcome to WebPerl! +====================== + +\[ [Home](index.html) - +[Using WebPerl](using.html) - +[Building WebPerl](building.html) - +[Wiki](https://github.com/haukex/webperl/wiki) - +[GitHub](https://github.com/haukex/webperl) - +[Notes](notes.html) - +[Legal](legal.html) \] + + +WebPerl uses the power of [WebAssembly](https://webassembly.org/) and +[emscripten](http://emscripten.org/) to let you run Perl 5 in the browser! + +**Notice: WebPerl is in beta.** +Some things may not work yet, and parts of the API may still change. +Your feedback is always appreciated! + +```html + + +``` + diff --git a/legal.md b/legal.md new file mode 100644 index 0000000..4831cae --- /dev/null +++ b/legal.md @@ -0,0 +1,32 @@ + +🕸️🐪 WebPerl Author, Copyright, and License +========================================= + +\[ [Home](index.html) - +[Using WebPerl](using.html) - +[Building WebPerl](building.html) - +[Wiki](https://github.com/haukex/webperl/wiki) - +[GitHub](https://github.com/haukex/webperl) - +[Notes](notes.html) - +[Legal](legal.html) \] + +**WebPerl ** + +Copyright (c) 2018 Hauke Daempfling (haukex@zero-g.net) +at the Leibniz Institute of Freshwater Ecology and Inland Fisheries (IGB), +Berlin, Germany, + +This program is free software; you can redistribute it and/or modify +it under the same terms as Perl 5 itself: either the GNU General Public +License as published by the Free Software Foundation (either version 1, +or, at your option, any later version), or the "Artistic License" which +comes with Perl 5. + +This program is distributed in the hope that it will be useful, but +**WITHOUT ANY WARRANTY**; without even the implied warranty of +**MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE**. +See the licenses for details. + +You should have received a copy of the licenses along with this program. +If not, see . + diff --git a/notes.md b/notes.md new file mode 100644 index 0000000..5170ad8 --- /dev/null +++ b/notes.md @@ -0,0 +1,56 @@ + +🕸️🐪 Misc. Notes on WebPerl +========================= + +\[ [Home](index.html) - +[Using WebPerl](using.html) - +[Building WebPerl](building.html) - +[Wiki](https://github.com/haukex/webperl/wiki) - +[GitHub](https://github.com/haukex/webperl) - +[Notes](notes.html) - +[Legal](legal.html) \] + + +TODOs +----- + + + + +Possible Improvements +--------------------- + +- More efficient JS/C/Perl glue +- Test/Support sockets/WebSockets + - for example, can we compile a DBD:: module to connect to a DB on the server? +- A RPC module for communicating between client and server Perls +- Support some of the Emscripten API (like wget?) +- Try to shrink the download size more (exclude more modules, ...?) + + +Limitations +----------- + +- Only works in browsers with WebAssembly support + (asm.js requires aligned memory access, and Perl apparently has quite a few places with unaligned access) +- 32-bit ints +- No `system`, `qx`, `fork`, `kill`, `wait`, `waitpid`, threads, etc. + - Theoretically, we could link in BusyBox to get a shell and utilities (??) + - (`system` and `qx` support could theoretically be added by patching `pp_system`/`pp_backtick` in `pp_sys.c`) +- No signals (except `SIGALRM`) +- In the current configuration, `exit` is not supported, and therefore `atexit` handlers aren't supported + (see discussion in `webperl.js`, and `NO_EXIT_RUNTIME` in the Emscripten documentation - currently it + seems to make the most sense to build with `NO_EXIT_RUNTIME=1`) +- Static linking, requires rebuild to add modules + (Emscripten apparently only supports asm.js dynamic linking when dynamic memory growth is disabled, which is not very useful) + + +Prior Art +--------- + +Several people have built microperl with Emscripten: + +- Harsha +- Shlomi Fish +- FUJI Goro + diff --git a/using.md b/using.md new file mode 100644 index 0000000..65d6dd3 --- /dev/null +++ b/using.md @@ -0,0 +1,15 @@ + +🕸️🐪 Using WebPerl +================ + +\[ [Home](index.html) - +[Using WebPerl](using.html) - +[Building WebPerl](building.html) - +[Wiki](https://github.com/haukex/webperl/wiki) - +[GitHub](https://github.com/haukex/webperl) - +[Notes](notes.html) - +[Legal](legal.html) \] + + +Nothing here yet. + diff --git a/webperl.png b/webperl.png new file mode 100644 index 0000000..a4359e2 Binary files /dev/null and b/webperl.png differ