Skip to content

hubenchang0515/shift

Repository files navigation

Shift

WebAssembly runtime for Python, Lua, Ruby and etc.

preview

Demo - 示例

链接生成

Python:

import base64
from urllib.parse import quote

lang = 'python'
input:str = quote(base64.b64encode(quote(input_text).encode('utf-8')).decode('utf-8'))
code:str = quote(base64.b64encode(quote(code_text).encode('utf-8')).decode('utf-8'))
url = f'https://xplanc.org/shift/#lang={lang}&input={input}&code={code}'

JavaScript:

lang = 'python'
input = encodeURIComponent(btoa(encodeURIComponent(input_text)))
code = encodeURIComponent(btoa(encodeURIComponent(code_text)))
url = `https://xplanc.org/shift/#lang=${lang}&input=${input}&code=${code}`

Tips

  • CC:
    • emcc
  • LDFLAGS:
    • -s EXPORT_ES6=1
    • -s EXPORTED_RUNTIME_METHODS=FS
    • -s ALLOW_MEMORY_GROWTH=1
    • -s ENVIRONMENT=web

About

WebAssembly runtime for Python, Lua, Ruby and etc.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published