Skip to content

Laundry list of todos #7

@ivankra

Description

@ivankra

Sketches of some ideas/improvements that may (or may not) be worth implementing. Moved out of repo's TODO.md.


  • [high] automated builds via github actions
    • make sure all dockerfiles point to master/lkgr-like
    • update.py to gen github workflows
    • lightweight bench
    • profile builds - time/space, optimize
  • [high] rewrite dist.sh script in python and cleanup dockerfiles using it
    • COPY dist.py . at the end of build (or bind mount it), then RUN ./dist.py ... to publish a build artefact to dist with flags to tweak metadata
    • Should support publishing multiple build artefacts per dockerfile e.g. js-interpreter and js-interpreter_jsc, narcissus and parser/narcissus
    • Flags to tweak metadata
      • --dist_du="--exclude=*.pyc ..." / --dist_du_flags
      • --license_glob="LICENSE.*,xxx"
      • --summary=...
      • --version_cmd="$BINARY --version | grep ...", git describe --tags -> only at dist time
      • --eshost=<host type>
    • simplify the common task of creating a bash wrapper
      • --bash_wrapper="exec $SCRIPT_DIR/..."
    • record how exactly is binary supposed to be run as part of metadata
      • --repl / --repl_cmd="$BINARY repl" => "repl_cmd": "$BINARY ..."
      • --run_cmd="$BINARY eval ${MODULE:+--module} $FILE"
        • FILE if accepts only one
        • FILES if many, sharing global namespace
        • MODULE=1 if run as module
        • --run_timed_cmd="$BINARY --time $TIME $FILE" (only time VM, exclude compilation)
      • maybe command to get host runtime's info (JS/JVM/NET/Lua etc)
        • --host_version_cmd="echo node $(node -v)"
        • --host_version_cmd="echo luajit -v | grep ..."
    • auto detect intrinsics needed for bench/conformance/test262.
      • "instrinsics": {key: true/false/replacement snippet}
      • "$262": true
      • "console.log": true
      • "print": "console.log" (print, println, console.log)
      • "Date.now()": "(new Date()).getTime()"
      • performance.now: false
      • putstr, read(line), eval, scriptArgs, ...
  • [high] test262
  • engines: rename "Standard" to "(Target) Specification"
  • clang/gcc variants: go over benchmark results and make the faster one the default variant. Check both archs, use cmp.py for detailed comparison, record compiler recommendation in .md or Dockerfile.
  • docker/Makefile: make depend, and check-in depend file for review, split up base rule
  • [med] cross compilation
    • define both arm64 and amd64 targets in Makefile, allow to cross compile using podman's qemu binfmt integration
    • ppc64 and riscv64 builds should be straightforward to implement now
    • riscv64 hoster: https://labs.scaleway.com/en/em-rv1/
    • add support for macOS containerization as alternative to docker/podman on macOS, it supports amd64 cross-compilation out of the box. complication: 32-bit dscriptcpp binary
  • wasm platform:
    • dist/wasm/* builds
    • try different wasm runtimes to run them wazero wasmtime etc
  • narcissus: vendor-in, add console.log() and multiple scripts command-line args
  • hako: go embed wasm module, update to new repo
  • js-interpreter_jsc, nashorn_ot - do something
  • engine262_jsc launcher
  • jscript via wine, download dll's via winetricks or something
  • avx2 / -march=x86-64-v3. bench major engines to check improvement, and maybe just switch all/most x64 builds to it.
  • make full-featured fully static builds the default? *_min/bench for size benchmarking
    • COPY libicu-static.sh ./ && ./libicu-static.sh
    • Generic ways to pass extra CFLAGS: wrapper, hack system gcc spec, clang's CCC_OVERRIDE_OPTIONS.
    • target triples beyond arm64/amd64; try *-musl for static builds
  • /dist/runtimes
    • node, bun, deno symlinks
    • node_0.x - nvm install 0.x
    • cjs/gjs
  • jszvu: esvu/jsvu equivalent
    • build from source on user's machine: docker, podman, buildah, macOS containerization
    • or fetch github build artifact
    • check builds from BASE=debian:stable and other releases
    • check compatibility of builds with non-debian distros; vs engines official builds
    • test running outside /dist, fix/document exceptions
    • version handling
  • update.py
    • checkout and update repos, update loc
    • check for broken links
  • bench
  • parsers / transpilers
    • expand and add transpilers
    • test parsers on conformance test suite, report results
    • test ES5 engines (mujs, duktape, node 0.x - nvm install 0, spidermonkey_1.8.5 etc) + transpilers on conformance test suite
  • conformance
    • align filenames with test262
    • ensure every test has ": (OK|failed|exception)", check for all to detect dumb echos
    • verify unexpected OKs
    • ES1: this/inheritance/hoisting tests
    • ESnext permalinks
    • default strict mode fixes, bun/deno
    • github.io conformance.html: compat-table's original + transposed layout, toggleable loadable details, opt for speed
    • record tested revision+date+version at the top of Conformance section in engine/*.md
    • run.sh 'engine [--flags]' <paths relative to conformance directory or absolute paths or ./relative-to-cwd>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions