hirofa / greencopperruntime Goto Github PK
View Code? Open in Web Editor NEWJavascript runtime library built in rust which can be used with quickjs
License: MIT License
Javascript runtime library built in rust which can be used with quickjs
License: MIT License
simple util to load script, cache it, run it, get results async
refactor from EsssesLib-q
should be doable to impl this in greco so it can be used with starlight and quickjs
see also:
Starlight-JS/starlight#27
https://stackoverflow.com/questions/12678716/transforming-typescript-into-javascript#12678997
Depends on HiRoFa/quickjs_es_runtime#39
See if we can make tsc.js run in qjs
refactor from EsssesLib-q
fetch init
make html parsing and mutation available via html dom module
docs: https://hirofa.github.io/GreenCopperRuntime/green_copper_runtime/modules/htmldom/index.html
todo
e.g. support the require method
impled as a feature
for script, something like rusts in comment tests
greco://i2c
based on https://github.com/rust-embedded/linux-embedded-hal
will first be tested with a pca9685 driving a bunch of servos
refactor from EsssesLib-q
refactor from EsssesLib-q
todo:
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
based on quickjs
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
refactor from EsssesLib-q
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.