Code Monkey home page Code Monkey logo

goboscript's Introduction

goboscript

image image

Installation and documentation

goboscript is the Scratch compiler. It lets you write Scratch projects in a text-based programming language. It outputs .sb3 files which can be opened in Scratch or Turbowarp. It is written in Rust and is designed to have fast compile times.

goboscript is text-based, so you can use Visual Studio Code to write Scratch projects, you can even use Github Copilot to help you write Scratch projects. goboscript also performs optimizations, has a powerful macro system which lets you do meta-programming. It even finds errors in your Scratch projects before you run them.

goboscript code Scratch blocks

Contributing

goboscript welcomes contributions in the form of Pull Requests.

goboscript is written in Rust. You'll need to install the Rust toolchain for development.

Note

To install goboscript, follow instructions at aspizu.github.io/goboscript. These instructions are for people who want to develop goboscript itself.

git clone https://github.com/aspizu/goboscript
cd goboscript

Development

After cloning the repository, run goboscript locally from the repository root with:

cargo run -- build -i your_project/

But, to make development easier, and to validate the generated Scratch project - use the tools/run script:

tools/run compile

This assumes that you have set-up a testing project at playground/. It will compile the project, validate it using the schemas from scratch-parser. If the validation fails, Scratch will refuse to load the project. To further debug the project, the generated project.json file is extracted from the .sb3 file in the playground/ directory.

Lets say that you modified the generated project in the Scratch editor or Turbowarp, and you want to look at the project.json. You can extract it with:

tools/run uncompile

Lets say that goboscript produced a broken project, and you are able to fix it by hand - by modifying the project.json. You can add back the project.json to the .sb3 file with:

tools/run patch

If you want to validate some .sb3 file, use:

tools/run check path/to/project.sb3

goboscript's People

Contributors

aspizu avatar xaspirus avatar poly2it avatar givenby avatar

Watchers

 avatar

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.