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

feat: restructure project for easier management of extensions, initial I/O operations #7

Merged
merged 3 commits into from
Aug 27, 2023

Conversation

Im-Beast
Copy link
Member

This PR restructures project so that extensions can be reused, there's no need to redefine them multiple times.

Project structure:

  • /bueno - bueno_runtime package, main stuff
  • /ext - bueno_ext package, things related to extensions, exposes extensions module which contains all extensions that are declared by ext.

Bueno. api /ext structure:

  • /ext/{api_name}/mod.js - JavaScript module where globalThis is modified in any way
  • /ext/{api_name}/{whatever}.js - modules imported by mod.js, they mustn't modify globalThis in any way

This PR also adds support for these API's (#6):

  • Bueno.io
    • read – read from resource id into given Uint8Array
    • readSync – sync version of io.read
    • write – async write to resource id using Uint8Array
    • writeSync – sync version of io.write
    • stdin – interface for working with standard input
    • stdout – interface for working with standard output
    • stderr – interface for working with standard error output

Std{in,out,err} classes are not finalized, currently they only have write/data/close methods.

@Im-Beast Im-Beast merged commit 9fe2d74 into main Aug 27, 2023
@Im-Beast Im-Beast deleted the init-bueno-io branch August 27, 2023 10:26
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

Successfully merging this pull request may close these issues.

1 participant