Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proof of concept for Lua scripts support #254

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

joseluisq
Copy link
Collaborator

@joseluisq joseluisq commented Aug 16, 2023

Description

This is just a proof of concept for supporting Lua scripts in SWS (eventually at some point) embedding the runtime.
It serves as an excuse to have a closer look at the details and possibilities of embedding Lua as well as its costs.

It works via an advanced configuration.

#....

### Scripts
[[advanced.scripts]]
# 1 MB
memory-limit = 1
# Lua opt-in stdlib modules
std = [ "io", "os", "pkg", "debug", "coroutine" ]
# Route
source = "/dynamic/**"
# Script path
destination = "tests/scripts/dynamic.lua"

There are some ideas to be refined in order to improve this work in progress, so will be shared here.
In case the evaluation is successful (most likely) then we can decide to include it under an experimental flag.

Any ideas are welcome.

Related Issue

Motivation and Context

My interest in Lua as a scripting utility for SWS and the discussion #253.

How Has This Been Tested?

Screenshots (if appropriate):

@joseluisq joseluisq self-assigned this Aug 16, 2023
@joseluisq joseluisq changed the title Proof of concept for Lua scripting support Proof of concept for Lua scripts support Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PoC This is only a proof of concept
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant