1.5.5 • Published 4 days ago

brs-engine v1.5.5

Weekly downloads
-
License
MIT
Repository
github
Last release
4 days ago

BrightScript Simulation Engine

An intepreter for the BrightScript language that runs Roku apps on browser platforms and Node.js.

GitHub NPM Version Build Quality Gate Status Security Rating Slack

The Project

The BrightScript Simulation Engine implements an interpreter for the BrightScript language, that can be embedded in Web, Electron and Node.js applications, allowing Roku apps to be executed in several different non-Roku platforms.

Initially the focus was on the Draw 2D API components (roScreen, roCompositor, roRegion, etc.) along with the core elements of the BrightScript language, allowing a full Roku app execution over an HTML5 Canvas, but it was extended to include simulation of the Roku file system, registry, remote control and the Micro Debugger.

This repository was originally a fork from brs, a BrightScript command line interpreter.

Important Notes:

  • At this stage, apps based on SceneGraph are not yet supported, but this feature is in the backlog to be implemented. Please check the Current Limitations document for further details on what else is still missing and what is out of scope.
  • Although brs-engine runs channels with user interface, it has no intention of emulating the full Roku OS or hardware devices, it is primarily aimed as a development tool for the Roku Community, and also to be used as a framework for running the BrighScript language in other platforms.

Technology and Compatibility

The brs-engine is developed in TypeScript and bundled as the following collection of Webpack JavaScript libraries:

Library FileDescription
app/lib/brs.api.jsProvides the Engine API to be imported and used by the Web applications hosting the Simulator.
app/lib/brs.worker.jsA Web Worker library that runs the language parser and interpreter in a background thread on the browser platform.
bin/brs.cli.jsExecutable CLI application that can be used from the terminal: - As a language shell - REPL (read-eval-print loop)- Executing brs, zip or bpk files- Packaging zip files into encrypted bpk packages.
bin/brs.node.jsA NodeJS library, similar to brs.worker.js that exposes the language parser and interpreter to be used by Node.js applications, the engine CLI and automated tests.
bin/brs.ecp.jsA NodeJS Worker library, used by the CLI to launch the ECP and SSDP services.

The Web Worker library require features like SharedArrayBuffer and OffScreenCanvas, that are relatively recent in the browser engines, because of that, it can only be executed on recent versions of:

  1. Chromium/Chrome version 69 or newer.
  2. Chrome Android version 89 or newer.
  3. Edge, version 79 or newer.
  4. Opera, version 56 or newer.
  5. Firefox, version 105 or newer.
  6. Safari macOS/iOS/ipadOS, version 16.4 or newer.
  7. Electron, version 4.0 or newer.

Note: The engine libraries are client-side only, nothing needs to be sent or processed in the server side.

How to Use the Simulator

Web Applications

This repository provides a sample web application you can build and run (learn how), but if you just want to use the simulation engine, not installing or downloading anything, try one of the web applications below:

Desktop Application

The simulator is also available as a multi-platform desktop application (Windows, Linux & macOS) that uses the package published by this project. The application introduces several aditional Roku features, such as the ECP (External Control Protocol) and Remote Console servers to allow integration with tools like Telnet or VSCode BrightScript Extension. You can also change the device configurations such as screen resolution, keyboard control customization, localization, among others. Download the installers and find more information in the links below:

Project Documentation

There are many ways you can use and/or participate in the project, read the documents below to learn more:

Changelog

  • Click here to view the release changelog.

Developer Links

License

Copyright © 2019-2024 Marcelo Lv Cabral. All rights reserved.

Licensed under the MIT license.

1.5.5

4 days ago

1.5.4

16 days ago

1.5.3

18 days ago

1.5.2

21 days ago

1.5.1

27 days ago

1.5.0

1 month ago

1.4.1

1 month ago

1.4.0

1 month ago

1.3.2

2 months ago

1.3.1

2 months ago

1.3.0

2 months ago

1.2.11

3 months ago

1.2.10

3 months ago

1.2.9

3 months ago

1.2.8

3 months ago

1.2.7

3 months ago

1.2.6

3 months ago

1.2.5

3 months ago

1.2.4

3 months ago

1.2.3

3 months ago

1.2.2

3 months ago

1.2.0

4 months ago

1.2.1

4 months ago

1.1.11

4 months ago

1.1.10

4 months ago

1.1.6-dev

4 months ago

1.1.7-dev

4 months ago

1.1.9

4 months ago

1.1.8

4 months ago

1.1.5-dev

4 months ago

1.1.4-dev

4 months ago

1.1.3-dev

4 months ago

1.0.0

5 months ago