Initial commit of WebPerl site
commit
4605b386fc
@ -0,0 +1,3 @@
|
||||
/web/
|
||||
/work/
|
||||
/emperl5/
|
||||
@ -0,0 +1,5 @@
|
||||
theme: jekyll-theme-minimal
|
||||
title: WebPerl
|
||||
description: Run Perl in the browser with WebPerl!
|
||||
logo: webperl.png
|
||||
show_downloads: false
|
||||
@ -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.
|
||||
|
||||
@ -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
|
||||
<script src="webperl.js"></script>
|
||||
<script type="text/perl">
|
||||
use WebPerl qw/js/;
|
||||
|
||||
print "Hello, Perl World!\n";
|
||||
|
||||
js('document')->getElementById('my_button')
|
||||
->addEventListener("click", sub {
|
||||
print "You clicked 'Testing!'\n";
|
||||
} );
|
||||
</script>
|
||||
```
|
||||
|
||||
@ -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 <http://webperl.zero-g.net>**
|
||||
|
||||
Copyright (c) 2018 Hauke Daempfling (haukex@zero-g.net)
|
||||
at the Leibniz Institute of Freshwater Ecology and Inland Fisheries (IGB),
|
||||
Berlin, Germany, <http://www.igb-berlin.de>
|
||||
|
||||
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 <http://perldoc.perl.org/index-licence.html>.
|
||||
|
||||
@ -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
|
||||
-----
|
||||
|
||||
<https://github.com/haukex/webperl/blob/master/ToDo.md>
|
||||
|
||||
|
||||
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 <https://github.com/moodyharsh/plu>
|
||||
- Shlomi Fish <https://github.com/shlomif/perl5-for-JavaScript--take2>
|
||||
- FUJI Goro <https://github.com/gfx/perl.js>
|
||||
|
||||
@ -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.
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
Loading…
Reference in New Issue