cmyr/rustplayground

Rust Playground for MacOS

status: experimental / pre-release / guaranteed buggy

status: experimental / pre-release / guaranteed buggy

The is a standalone native mac application that allows quickly editing and testing rust snippets.

installation

You can download a disk image of a recent build on the releases page.

requirements

The playground requires rustup, and allows code to be run with any installed toolchain. note: Rustup must currently be in the default directory, $HOME/.rustup.

install from source (requires Xcode)

  • clone this repository
  • cd in to the RustPlayground directory
  • run xcodebuild from the command line
  • copy build/Release/Rust Playground.app to your Applications directory

About

This project is based on a fork of the xi-editor core. It is intended largely as an experimental offshoot of xi; a narrowly scoped editor frontend that can be used to experiment with various design decisions.

Document state is handled in rust; the swift frontend interfaces with the rust code via FFI.

Features

  • syntax highlighting
  • font selection
  • auto-indent
  • comment toggling
  • line breaking
  • extern crates (with a hacky custom syntax for declaring imports)
  • use any installed toolchains

Known issues

  • Performance is not great; it is expected that documents are only ever a few hundred lines.
  • Drawing is hacky. We may draw ghost selections.

TODO

  • ~export to gist / web playground~
  • export to new cargo project?
  • rustfmt / clippy
  • multiple documents, saving snippets?
  • ASM / IR output

One day, maybe

  • integrate with cargo-instruments
  • benchmarking
  • inline compiler warnings
  • autocomplete
  • RLS support
  • Rust Analyzer support

Thanks

to the xi-editor contributors, to Jake Goulding for the excellent play.rust-lang.org implementation, and to the Rust community at large.

Issues

Collection of the latest Issues

thomcc

thomcc

enhancement
Comment Icon1

If you want to see this for a crate not part of the web playground, this is a big hassle, but seems like it would fit nicely with this tool. Sorry if this exists and I'm just missing it.

(P.S. the .dmg for 0.2 seems busted for me, I had to install from source)

nerosnm

nerosnm

Comment Icon1

I notice that in a few places within the playground-utils-ffi crate, calls to expect() are made, and within xi-ffi, several calls to assert!() are made.

As far as I understand, throwing panics over the FFI is UB, and I wanted to flag this to your attention; I would suggest these be replaced with some other method of indicating errors. I know that Mozilla's ffi-support crate provides utilities for helping with this, for example.

Versions

Find the latest versions by id

v0.2.1 - Nov 22, 2019

A few small improvements

  • fixed a crash when dependencies were specified incorrectly
  • added ability to pass --release to cargo
  • support back to 10.13

v0.2 - May 08, 2019

Polish and small features.

  • Output during compilation is now streamed, so you can see if crates are downloading or compiling.
  • Output for errors and warnings is now colorized.
  • Sharing: you can now create gists, and open your playgrounds on play.rust-lang.org

v0.1.1.b1 - Apr 27, 2019

This build may install, and might not format your hard drive.

  • Fixed text geometry issues / improve selection drawing
  • draw vertical cursor and blink it
  • improved dark mode support

v0.1-alpha.b1 - Apr 25, 2019

This build will probably not install, and if it does it will probably reformat your hard drive.

Information - Updated May 23, 2022

Stars: 236
Forks: 3
Issues: 4

AutoPilot is a Rust port of the Python C extension

Currently supported on macOS, Windows, and X11 with the XTest extension

AutoPilot is a Rust port of the Python C extension

macOS/iOS Security framework for Rust

MIT license (LICENSE-MIT or

macOS/iOS Security framework for Rust

Rust library to manipulate file system access control lists (ACL) on macOS, Linux, and FreeBSD

This module provides two high level functions, getfacl and setfacl

Rust library to manipulate file system access control lists (ACL) on macOS, Linux, and FreeBSD

btleplug is an async Rust BLE library, supporting Windows 10, macOS, Linux, and possibly iOS...

btleplug is an async Rust BLE library, supporting Windows 10, macOS, Linux, and possibly iOS and

btleplug is an async Rust BLE library, supporting Windows 10, macOS, Linux, and possibly iOS...

Linux, macOS, Windows:

Rust bindings to the PC/SC API for smart card communication

Linux, macOS, Windows:

Rubrail is a Rust library for building Touch Bar interfaces for Mac OS X

It creates a persistent icon in the 'Control Strip' region on the right side of the touchbar

Rubrail is a Rust library for building Touch Bar interfaces for Mac OS X

Learn-Mozillas-RUST-Programming-Language(MacOs_X El Capitan 10

Proficient use of the basic modules of the standard library and collections to compose algorithms, CRATES, file/directory handling and (de)serialization for most common data formats,...

Learn-Mozillas-RUST-Programming-Language(MacOs_X El Capitan 10

Run a Postgresql database locally on Linux, MacOS or Windows as part of another Rust...

Run a Postgresql database locally on Linux, MacOS or Windows as part of another Rust application or test

Run a Postgresql database locally on Linux, MacOS or Windows as part of another Rust...

This is a CoreMIDI library for Rust built on top of the low-level bindings coremidi-sys

CoreMIDI is a macOS framework that provides APIs for communicating with MIDI (Musical Instrument Digital Interface) devices, including hardware keyboards and synthesizers

This is a CoreMIDI library for Rust built on top of the low-level bindings coremidi-sys

Rust crate to install a macOS package

Useful for sysadmin tasks

Rust crate to install a macOS package
Facebook Instagram Twitter GitHub Dribbble
Privacy