JavaScript/TypeScript runtime Deno was meant to be.

Overview

Project Bueno (temporary name)

Bueno is a web-standards focused JS/TS runtime with as much tooling built-in as possible. It is meant to be both a learning project and a sort of spiritual sibling to Deno 1.x. Bueno is very ambitious and has many goals, but one of the non-goals is support for node modules in any way (outside of transpilation by CDNs).

Goals

  • Native support TypeScript/TSX/JSX
  • Support as many Web Standard API's as possible
  • URL Imports
  • Go fast

Anti-Goals

  • Node/npm support IN ANY SHAPE OR FORM
  • Support for Deno.* APIs outside of possible shims

Why not Deno?

Bueno's goal is to follow the spirit of what Deno was originally was meant to be, a good JS/TS runtime.

In many regards, this isn't true anymore. Deno supports many features that stray away from it's web-focused nature which could be considered as turning it's back away from it's original design goals. Some of the recent decisions have been controversial in the community and are some things we'd like to avoid implementing e.g.: npm:, node: specifiers and soon to be deno: specifier, package.json support and more.

Why not Node?

Node was a great first stab at running real JS applications on the server side but it's age really starts to show. It does have the advantage of being focused and universal, though both of those are becoming less relevant as time goes on. CommonJS continues to drag down the ESM ecosystem in a way that is really unfortunate. It's time to let go of Node.

Why not Bun?

Frick Bun. We'll start to consider Bun as a serious alternative when they:

  • Start treating employees better
  • Stop cheating on benchmarks
  • Stick to web standards
  • Abandon CommonJS
  • Stop segfaulting
Comments
  • feat: Enforce asynchronous operations on FS/IO

    feat: Enforce asynchronous operations on FS/IO

    This removes synchronous versions of Bueno.fs and Bueno.io operations. They're an anti-pattern, synchronous API's block everything in tokio's event loop.

    opened by Im-Beast 1
  • Panics when importing URLs with no file extension

    Panics when importing URLs with no file extension

    Importing a URL with no file extension (e.g. https://esm.sh/whatwg-fetch) results in the following error:

    thread 'main' panicked at 'Failed extracting file extension: ()', bueno/loader.rs:46:26
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    

    This is due to bueno/loader.rs checking for the file extension on both file imports and HTTP imports. This can be resolved by checking for a protocol in front of the import path (e.g. http, https, file://, or (); no protocol so default to file://, etc). This will allow us to check whether or not there's a Content-Type, which would allow for extensionless imports and therefore allow imports without explicit file extensions.

    opened by jordanreger 1
  • Filesystem APIs Ticket

    Filesystem APIs Ticket

    One of the core sets of APIs that must be available for Bueno to be useable are the file system APIs. This issue tracks all of the filesystem APIs we're missing.

    • [ ] readFile - async read file and return uint8array
    • [ ] readFileSync - sync version of above
    • [ ] readTextFile - async read text file and return uint8array
    • [ ] readTextFileSync - sync version of above
    • [ ] writeFile - async write file form uint8array
    • [ ] writeFileSync - sync version of above
    • [ ] writeTextFile - async write text file form uint8array
    • [ ] writeTextFileSync - sync version of above

    We'll edit this list as we complete some. We need to discuss our file API. How should we design it? What will our Bueno.fs.File class (?) look like?

    opened by lino-levan 1
  • feat: initial file system operations

    feat: initial file system operations

    Follow up to #3, most of the code has been reused. This PR adds support for these API's (#6):

    • fs
      • [x] readFile – async read file and return Uint8Array
      • [x] readFileSync – sync version of fs.readFile
      • [x] readTextFile – async read file and return string
      • [x] readTextFileSync – sync version of fs.readTextFile
      • [x] writeFile – async write file using Uint8Array
      • [x] writeFileSync – sync version of fs.writeFile
      • [x] writeTextFile – async write file using string
      • [x] writeTextFileSync – sync version of fs.readTextFile
      • [x] removeFile - asynchronously delete file
      • [x] removeFileSync - sync version of fs.removeFile
      • [x] removeDirectory - asynchronously delete directory
      • [x] removeDirectorySync - sync version of fs.removeDirectory

    ~~This PR doesn't use op2's, it can be done as a follow up~~ Most of the ops have been converted to op2, the only one that isn't is op_read_text_file

    opened by Im-Beast 0
  • feat: add support for http(s) imports

    feat: add support for http(s) imports

    Adds support for http(s) imports and run command.

    TODO:

    • [x] Support http(s) imports
    • [x] Support http modules in bueno run <module-path> subcommand
    • [x] Cache the modules
      • [x] Simple saving and loading modules from ~/.cache/bueno/modules/...
      • [x] Storess already transpiled modules
      • [x] Support for reloading
    opened by Im-Beast 0
  • feat: restructure project for easier management of extensions, initial I/O operations

    feat: restructure project for easier management of extensions, initial I/O operations

    This PR restructures project so that extensions can be reused, there's no need to redefine them multiple times.

    Project structure:

    • /bueno - bueno_runtime package, main stuff
    • /ext - bueno_ext package, things related to extensions, exposes extensions module which contains all extensions that are declared by ext.

    Bueno. api /ext structure:

    • /ext/{api_name}/mod.js - JavaScript module where globalThis is modified in any way
    • /ext/{api_name}/{whatever}.js - modules imported by mod.js, they mustn't modify globalThis in any way

    This PR also adds support for these API's (#6):

    • Bueno.io
      • [x] read – read from resource id into given Uint8Array
      • [x] readSync – sync version of io.read
      • [x] write – async write to resource id using Uint8Array
      • [x] writeSync – sync version of io.write
      • [x] stdin – interface for working with standard input
      • [x] stdout – interface for working with standard output
      • [x] stderr – interface for working with standard error output

    Std{in,out,err} classes are not finalized, currently they only have write/data/close methods.

    opened by Im-Beast 0
  • (Possible) in-house `fetch` API

    (Possible) in-house `fetch` API

    This is a PR that contains possible code for an in-house fetch API. There are also a few minor changes that clean up the workspace and a few more example files.

    opened by jordanreger 0
  • Tracking issue for `Bueno.` API's

    Tracking issue for `Bueno.` API's

    Currently planned API's:

    this list should be expanded upon on the fly

    Bueno.

    • fs
      • [x] readFile – read file and return Uint8Array
      • [x] readTextFile – read file and return string
      • [x] writeFile – write file using Uint8Array
      • [x] writeTextFile – write file using string
      • [x] removeFile - delete file
      • [x] removeDirectory - delete directory
      • [ ] copyFile - copy file
      • [ ] copyDirectory - copy directory
      • [ ] moveFile - move/rename file
      • [ ] moveDirectory - move/rename directory
      • [ ] makeDirectory - create a new directory
      • [ ] makeFile - create a new file
      • [ ] makeTempDirectory - create a new temporary directory in /tmp
      • [ ] makeTempFile - create a new temp file in /tmp
      • [ ] watch - create iterable which yields changes in file system
    • io
      • [x] read – read from resource id into given Uint8Array
      • [x] write – async write to resource id using Uint8Array
      • [x] stdin – interface for working with standard input
      • [x] stdout – interface for working with standard output
      • [x] stderr – interface for working with standard error output
    opened by Im-Beast 1
  • suggestion: `fetch` API

    suggestion: `fetch` API

    We need to have some way of interacting with the web. If we implement this, we should get a huge boost in the amount of modules we can run. We should take a lot of inspiration from Deno here.

    opened by lino-levan 0
Owner
Bueno
JavaScript/TypeScript runtime Deno was meant to be
Bueno
Tools - The Rome Toolchain. A linter, compiler, bundler, and more for JavaScript, TypeScript, HTML, Markdown, and CSS.

Rome is currently being rewritten in Rust. Read more about it in our latest blog post. The documentation below is out of date and available for poster

Rome 22k Jan 3, 2023
A Faster(⚡) formatter, linter, bundler, and more for JavaScript, TypeScript, JSON, HTML, Markdown, and CSS Lapce Plugin

Lapce Plugin for Rome Lapce-rome is a Lapce plugin for rome, The Rome is faster ⚡ , A formatter, linter, compiler, bundler, and more for JavaScript, T

xiaoxin 7 Dec 16, 2022
Resolve JavaScript/TypeScript module with Rust

ES Resolve JavaScript/TypeScript module resolution in Rust Installation cargo add es_resolve Get Started use std::path::{Path, PathBuf}; use es_resolv

wang chenyu 2 Oct 12, 2022
compile TypeScript or JavaScript to binaries

the powr project Development is paused until 2023. ?? powr aims to be a javascript/typescript engine to power serverless functions over the web. the j

powr.js 18 Dec 29, 2022
A command line interface meant to bridge the gap between Rust and shell scripting

clawbang A command line interface meant to bridge the gap between Rust and shell scripting. Intended for use with HEREDOCs and shebangs: $ clawbang <<

Chris Dickinson 52 Mar 25, 2022
🛠 SmartGPT is an experimental program meant to provide LLMs

?? SmartGPT is an experimental program meant to provide LLMs (particularly GPT-3.5 and GPT-4) with the ability to complete complex tasks without user input by breaking them down into smaller problems, and collecting information using the internet and other external sources.

n0y0u 3 Feb 25, 2024
The module graph logic for Deno CLI

deno_graph The module graph/dependency logic for the Deno CLI. This repository is a Rust crate which provides the foundational code to be able to buil

Deno Land 67 Dec 14, 2022
CLI tool to quickly create React + Typescript + Tailwind projects

QUICK INIT CLI Tool to quickly create React projects with Tailwind automatically configured for use. Typescript is selected as default. If JS is to be

Oscar 5 Nov 3, 2022
A Typescript interpreter in Rust.

typescript This is a Rust native implementation of a Typescript Parser and a JIT execution engine. This project comes in two crates: [typescript-ast]:

Arne Simon 4 Oct 31, 2022
Write CI/CD pipelines using TypeScript

Katoa Katoa is a community fork of Cidada, a tool created by Fig which was sunset in late 2023 following acquisition by AWS. This fork and the underly

Katoa 47 Oct 6, 2023
Build terminal dashboards using ascii/ansi art and javascript

blessed-contrib Build dashboards (or any other application) using ascii/ansi art and javascript. Friendly to terminals, ssh and developers.

Yaron Naveh 15k Jan 2, 2023
Valq - macros for querying and extracting value from structured data by JavaScript-like syntax

valq   valq provides a macro for querying and extracting value from structured data in very concise manner, like the JavaScript syntax. Look & Feel: u

Takumi Fujiwara 24 Dec 21, 2022
Eslint - Find and fix problems in your JavaScript code.

ESLint Website | Configuring | Rules | Contributing | Reporting Bugs | Code of Conduct | Twitter | Mailing List | Chat Room ESLint is a tool for ident

ESLint 22k Jan 9, 2023
Execute Javascript code in the Dioxus, and get the return value ( for Dioxus )

Golde Dioxus Execute Javascript code in the Dioxus, and get the return value. This demo can help use Javascript to calc the + operator formula. use di

YuKun Liu 15 Dec 27, 2022
Pure Rust implementation of Javascript Object Signing and Encryption (JOSE)

RustCrypto: JOSE Pure Rust implementation of Javascript Object Signing and Encryption (JOSE) License All crates licensed under either of Apache Licens

Rust Crypto 20 Dec 24, 2022
Abuse the node.js inspector mechanism in order to force any node.js/electron/v8 based process to execute arbitrary javascript code.

jscythe abuses the node.js inspector mechanism in order to force any node.js/electron/v8 based process to execute arbitrary javascript code, even if t

Simone Margaritelli 301 Jan 4, 2023
The JavaScript Oxidation Compiler -> Linter / Prettier

The JavaScript Oxidation Compiler (oxc) Why this project? The goal of this project is to: Create a blazingly fast JavaScript Compiler written in Rust.

Boshen 125 Feb 22, 2023
Demo app duplicated in 5 languages (Go/JavaScript/Python/Ruby/Rust) showing how to go from source code to container image using melange+apko

hello-melange-apko ?? This repo contains an example app duplicated across 5 languages showing how to: Package source code into APKs using melange Buil

Chainguard 16 Jan 23, 2023