ultnote

Crates.ioultnote
lib.rsultnote
version0.0.20
sourcesrc
created_at2022-01-23 03:14:59.893622
updated_at2022-01-25 12:45:17.044073
descriptionTakes from VS Code Notebook, runs it, and returns output and errors
homepage
repositoryhttps://github.com/ultdocs/ultnote-kernel
max_upload_size
id519473
size14,894
Jack Clayton (jackos)

documentation

https://docs.rs/ultnote/

README

Ultnote

Introduction

Currently this just runs code generated by VS Code Notebooks, it takes requests in the form of Rust code along with VS Code Notebook cell information. Data is retained in memory as long as the server is running, it's meant to be run locally as it uses raw TCP with no HTTP.

It's currently being used just for the VS Code extension - Ultnote.

This is still in the experimental stages, there are many features to be added.

Links

Quick Start

To start a server on port 8787 and await requests:

cargo install ultnote 
ultnote

Rust <-> VS Code communication

VS Code and Rust communicate over TCP with utf8, it doesn't follow http protocol as it's just running locally. There are no dependencies in the Rust of Nodejs code, this is to keep the extension size to minimum, and to minimize Rust compile time on first run.

Currently working

  • - Take in Rust code, run it and return stdout / stderr
  • - Work with VS Code Notebook features e.g. cell order may change
  • If the file that notebook is being run from changes, reset state
  • Move use outside the fn main body
  • Add use required crates to cargo.toml
  • Pre-cache most popular crates, run this as an opt in background process
  • Environment variable to set the port
  • Move to web framework for security features
  • Use traits to allow for use from VS Code or from browser
  • On request where last item is an expression, return debug/format output in nicely formatted html that can be rendered in VS Code or a browser.
Commit count: 0

cargo fmt