-
Notifications
You must be signed in to change notification settings - Fork 538
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
Add Embedded Lua for Flexible Filters, Asserts and Captures #3729
Comments
Hi @ossie-git Thanks for the issue. It's really unlikely that we add such a feature, we're trying very hard not to add dependencies, even if it means having a less flexible tool. On the security side of thing, I'm really not at ease with embedding script capabilities inside a Hurl file, that could, for instance, erase some random directories. That said, in a (near) future, Hurl will have a better support for expression, something like:
|
Hi @jcamiel mlua uses a sandboxed embedded Lua implementation that removes dangerous packages including:
So they have removed all the potentially dangerous functions in Lua. As an additional layer or protection, this feature can be added behind a compile time feature flag so that users who wanted it would have to compile it, enabling the feature flag |
Hi @ossie-git, thanks for your comment,
I'm sorry I will be hard to convince 😅: the fewer dependencies we have, the simpler the maintainer job is! |
Hi @jcamiel I doubt I'll win this discussion but here goes:
|
https://github.com/rhaiscript/rhai would be a better fit since you can easily reduce the language and it is pure rust. |
@lu-zero While it appears more Rust-native, from what I understand, it:
|
While adding an external interpreter seems very attractive in terms of flexibility,
As mentioned before, we plan to add expression to the language, which should make it a lot more flexible. |
Problem to solve
I was wondering if there is any direction of embedding something like Lua (or JavaScript) to allow for custom filters, asserts and captures. For example, I ran into an issue where the server may return more than one HTTP response code and I would be OK with either one (such as the issue mentioned here: #2035).
I understand that hurl tries to be easy to use and dislikes flexibility, but a feature like this would allow advanced users to add custom filters, asserts and captures.
Proposal
I don't know Rust but I have seen praise for the mlua crate.
Additional context and resources
Tasks to complete
The text was updated successfully, but these errors were encountered: