{"id":18924537,"url":"https://github.com/sharpcoder/fuzzyjs","last_synced_at":"2025-04-15T12:32:34.261Z","repository":{"id":68421926,"uuid":"39308613","full_name":"SharpCoder/fuzzyjs","owner":"SharpCoder","description":"embeddable javascript interpreter written in c++","archived":false,"fork":false,"pushed_at":"2015-07-28T23:35:28.000Z","size":624,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T21:21:43.741Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SharpCoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-18T18:36:42.000Z","updated_at":"2023-09-08T16:59:42.000Z","dependencies_parsed_at":"2023-02-28T01:45:42.526Z","dependency_job_id":null,"html_url":"https://github.com/SharpCoder/fuzzyjs","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/SharpCoder%2Ffuzzyjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpCoder%2Ffuzzyjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpCoder%2Ffuzzyjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpCoder%2Ffuzzyjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SharpCoder","download_url":"https://codeload.github.com/SharpCoder/fuzzyjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249072466,"owners_count":21208190,"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":[],"created_at":"2024-11-08T11:07:05.756Z","updated_at":"2025-04-15T12:32:33.994Z","avatar_url":"https://github.com/SharpCoder.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# project fuzzyjs\nThis is a fully embeddable javascript interpreter written in c++. It is not ECMAScript compliant, is not efficient, probably shouldn't be used in a real situation. The benefit, however, is that this project has _absolutely no dependencies._ You do not even have to include stdio.h! The only requirement is that you implement **malloc** and support of the **new** / **free** keywords.\n\n## Why is this a thing?\nI want to utilize javascript in a baremetal project of mine. As such, I don't have access to any of the standard libraries which is an odd restriction. I couldn't find any project that was completely standalone, so I decided to try my hand at rolling my own. The scope of fuzzyjs is not overly ambitious and I do not expect to ever support full ECMAScript compliance. But who knows?\n\n## How do I use this?\nLook at fjs.cpp for a small demonstration, but essentially just include \"fjs.h\" and then you have access to the JSParser object. Instantiate it and call the _parse_ method which takes a char* of code and away you go! There are also methods to register c++ functions for use in javascript (per the demo).\n\n## Testing Framework\nI use the cxxTest Unit Testing framework. Since I'm developing on linux, this was my choice as it's pretty easy to get setup. I highly recommend it. Also, I modified my makefile to have an option that automatically runs the test suite (provided it's installed) which is pretty awesome! More info here: http://cxxtest.com/\n\n## What is supported?\nThe following language features are currently supported (this list will be updated as I add more stuff).\n\n- variable assignment\n- function declaration\n- c++ interop \"delegates\"\n- delegate invocation\n- evaluate simple expressions\n- string concatenation\n- javascript functions\n- the return keyword!\n- object creation via: prototypes\n- object instantiation\n- anonymous functions as parameters\n- basic math: plus, minus, multiply (division is a different beast that I will implement later)\n- boolean logic operators\n- (System Command) parseInt\n- increment operators\n- for loops\n- while loops\n- universal \"object\" prototype\n\nMore to come!\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpcoder%2Ffuzzyjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharpcoder%2Ffuzzyjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpcoder%2Ffuzzyjs/lists"}