{"id":16927455,"url":"https://github.com/delskayn/toyjs","last_synced_at":"2025-10-11T09:41:01.105Z","repository":{"id":50487426,"uuid":"253287813","full_name":"DelSkayn/toyjs","owner":"DelSkayn","description":"A toy javascript interpreter written in rust. Very much under development.","archived":false,"fork":false,"pushed_at":"2024-09-29T16:23:23.000Z","size":10187,"stargazers_count":34,"open_issues_count":12,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T20:24:22.817Z","etag":null,"topics":["ecmascript","interpreter","javascript","javascript-engine","javascript-interpreter","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DelSkayn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-05T17:06:26.000Z","updated_at":"2025-01-24T00:13:00.000Z","dependencies_parsed_at":"2024-01-24T23:47:24.003Z","dependency_job_id":"5e0f9903-59b6-44b2-a3f6-9ce65ac85a21","html_url":"https://github.com/DelSkayn/toyjs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DelSkayn%2Ftoyjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DelSkayn%2Ftoyjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DelSkayn%2Ftoyjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DelSkayn%2Ftoyjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DelSkayn","download_url":"https://codeload.github.com/DelSkayn/toyjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243852438,"owners_count":20358270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ecmascript","interpreter","javascript","javascript-engine","javascript-interpreter","rust"],"created_at":"2024-10-13T20:34:16.576Z","updated_at":"2025-10-11T09:40:56.081Z","avatar_url":"https://github.com/DelSkayn.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Toyjs javascript interpreter.\n\nThis repository contains the code of a toy javascript interpreter. \nBuilt for experimentation with building dynamic languages.\n\nThis interpreter is very much under development and lacks support for a large part of the\njavascript language.\n\nYou can play around with an previous version of the interpreter in your browser [here](https://delskayn.github.io/toyjs/)\n\n## Features\n - Register based bytecode VM\n - Handwritten parser.\n - Traditional Lexer to Parser to ast to compiler to bytecode design.\n - Almost safe sweep and trace GC \n - Minimal dependencies.\n\n## Current State\n\nThe engine is currently undergoing a rewrite and is in a non-functional state.\n\nBut you can play around with the currently functional parts of the interpreter.\n\n\n## Running the interpreter\n\nThe VM is currently very bare-bones, with only a very small number of instructions implemented.\nA simple example for the VM can ran with \n\n```sh\ncargo run --example vm\n```\n\nAll examples take either a file name or assume a script will be piped into stdin.\n\nThe interpreter has varies tools for printing data-structures and generated source information.\n\nFor printing a AST you can use\n```sh\ncargo run --example parse\n```\nThe lexer can similarly be run on code with\n```sh\ncargo run --example lex\n```\n\nA overview of symbol information produced by the compiler can be printed with\n```sh\ncargo run --example resolve\n```\n\nA script can be compiled and the compiled instructions can be dumped with\n```sh\ncargo run --example compile\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelskayn%2Ftoyjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdelskayn%2Ftoyjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelskayn%2Ftoyjs/lists"}