Code Monkey home page Code Monkey logo

greencopperruntime's People

Contributors

actions-user avatar andrieshiemstra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

greencopperruntime's Issues

make features engine agnostic

since i want to create a lib where you can choose the javascript runtime i want to rewrite the features to be impl agnostic (use EsValueFacade instead of native methods)

some features like gpio will only be available for quickjs

mysql module

refactor from EsssesLib-q

todo:

  • rebuild to use SQLx / deadpool
  • native methods instead of closures

macro preproc

something like this

//# // define console_debug macro
//#function console_debug(line){
//#    if ($GRECO_DEBUG) {
//#        // write actually writes to js/ts code
//#        write("console.debug('"+line+"')");
//#    }
//#}
function do_stuff(){
    //#console_debug('doing stuff');
    console.log("do stuff");
}

all files are evaluated in the same context so you can define and redifine functions and variables

The code above will expand to the following if $GRECO_DEBUG = true; (running in debug mode)



function do_stuff(){
    console.debug('doing stuff');
    console.log("do stuff");
}

comments are removed, lines are preserved so line numbers still make sense

a rust util will extract all code prepended by //# and replace all others with write(line)

the whole file is then evaluated with a new write method/buffer and the output is actually used/stored/cached etc

faas utils

simple util to load script, cache it, run it, get results async

HTML Dom

make html parsing and mutation available via html dom module

docs: https://hirofa.github.io/GreenCopperRuntime/green_copper_runtime/modules/htmldom/index.html

todo

  • NodeList
  • next/previousElementSibling
  • innerHTML
  • className
  • querySelector(all)
  • children/childNodes
  • append/removeChild
  • replaceChild
  • insertBefore/After
  • document.getElementById
  • textContent
  • nodeType
  • lists.forEach
  • fix === compare by returning same JSValue for nodes (will need a map with jsvalueref without refcount increment) (remove on proxy finalizer)
  • cloneNode
  • native methods for freq used (or all) instead of closures

fetch api todos

fetch init

  • headers
  • mode
  • body
    • json
    • text
    • binary
  • cache
  • credentials (cookies)
  • client per realm
  • http client as param
    Response
  • get body
    • binary data
    • json
  • headers

unit tests

for script, something like rusts in comment tests

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.