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

Rhai standard library. #451

Open
LordMZTE opened this issue Sep 23, 2021 · 12 comments
Open

Rhai standard library. #451

LordMZTE opened this issue Sep 23, 2021 · 12 comments

Comments

@LordMZTE
Copy link

There currently seems to be no plugin/library that allows giving rhai scripts full system access by allowing them to do things like spawning subprocesses or doing filesystem operations. Is something like this planned as an optional feature or has someone already made this as a seperate crate?

@schungx
Copy link
Collaborator

schungx commented Sep 23, 2021

Not really. It was originally planned but nobody sorta got around to it...

In fact, the entire Rhai plugins system was originally written just so that such a sys library could be developed...

@schungx
Copy link
Collaborator

schungx commented Nov 1, 2021

Seeking contributors to build up Rhai's standard library.

@schungx schungx changed the title sys plugin Rhai standard library. Nov 1, 2021
@cn-kali-team
Copy link

When I chose the script engine, I found that there is a standard module. We can learn from it

rune_modules

@schungx
Copy link
Collaborator

schungx commented Dec 29, 2021

It is true. It does leave something to be desired.

I agree that having a basic standard module is a quite urgent need.

@naturallymitchell
Copy link

naturallymitchell commented Dec 29, 2021

Jazz's standard fs library and fs-extras library are adequate for Jazz Flute, the standard application framework. The other crates that are integrated by default in the scripting environment can also be found in the bindings directory.

rhai's RandomPackage makes it look pretty easy to integrate with Jazz.

@schungx schungx assigned schungx and unassigned schungx Sep 29, 2022
@schungx
Copy link
Collaborator

schungx commented Sep 29, 2022

@dankope has indicated that he'd work on this... let me see if this mention is enough to assign this issue to him...

EDIT: Hmmm.... looks like no. @dankope, would you make a comment here so I can assign you?

@emesare
Copy link
Member

emesare commented Sep 29, 2022

EDIT: Hmmm.... looks like no. @dankope, would you make a comment here so I can assign you?

Should be able to assign me now, hopefully.

@emesare
Copy link
Member

emesare commented Oct 13, 2022

First package done! Please try it out and leave feedback on what should be changed/fixed, thanks. https://github.com/rhaiscript/rhai-fs

The next package will most likely be networking. The networking package will only use what is available in the rust std library to ensure compatibility.

@eliabieri
Copy link

Any updates on the networking package?

@emesare
Copy link
Member

emesare commented Mar 11, 2023

Any updates on the networking package?

Hi, thank you for asking, I have been busy lately however I should have some time next week to get it in a good shape for publishing, thanks again for taking the time to ask.

@emesare
Copy link
Member

emesare commented Mar 18, 2023

The networking package has been pushed to the preliminary stage (aka not in the rhai org yet) here: https://github.com/emesare/rhai-net! Currently it supports TCP server and client functionality however there is quite a bit still yet to be done, I will have the issues for it filled out later tomorrow hopefully, so everyone is on the same page as to what to expect. My goal is to have it be extensible via other rust packages for example an HTTP client rhai package could include this and use its SharedTcpStream to retrieve an open stream to then read/write from.

@schungx
Copy link
Collaborator

schungx commented Nov 29, 2023

@eliabieri I wonder if the networking package is still progressing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants