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

Add the support of fs and env #43

Closed
DarumaDocker opened this issue Mar 11, 2022 · 3 comments
Closed

Add the support of fs and env #43

DarumaDocker opened this issue Mar 11, 2022 · 3 comments

Comments

@DarumaDocker
Copy link
Member

https://github.com/second-state/wasmedge-quickjs/blob/main/example_js/react18_ssr/main.mjs#L8
Currently, the CSS can only be imported as a module in the example.

But in reality, the assets will be built with some random file names, something like main.073c9b0a.css.
This requires the server can read the content from the file system.

As Wasi has supplied the files and env API, it would be great to add modules like 'wasi_fs' and 'wasi_env`.

@L-jasmine
Copy link
Collaborator

About fs. In quickjs 'std' module has some function.
If you need other fs function, please tell me more.

About env. I don't know what function is needed. Can you show me how you want to use it?

@DarumaDocker
Copy link
Member Author

In Nodejs, I can get environment variables via process.env. The typical scenario is to set its port when the server starts.

@L-jasmine
Copy link
Collaborator

#44

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

No branches or pull requests

2 participants