Skip to content

flux-rs/flux-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flux Playground

Service to run flux in the browser.

Development

For development it is recommended to run the server and client separately

Run Server

To run the server

$ cargo run -- --rustc-flux-path /path/to/rustc-flux

Alternatively, you can install cargo watch:

$ cargo install cargo-watch

and run the server with

$ cargo watch -x "run -- --rustc-flux-path /path/to-/rustc-flux"

This will start a server in port 3000.

Run Client

Install dependencies

The first time you run the client you need to install the dependencies

$ cd client
$ npm install

Run vite server

$ cd client
$ npm run dev

This will start a server for the client with hot reload. It prints the URL where it is served.

Add examples

To add an example put a file in the examples/ directory and then add an appropriate entry to config.yaml. Files are checked as if they were inside the lib/ directory, which means files in that directory can be declared as modules inside example files. See kmeans.rs for an example that declares the rvec module.

Deploy

Build

First run

$ ./install.sh

This will build the server and client, and then move all necessary files to ./dist.

Start server

To start the server

$ cd dist
$ ./flux-playground --rustc-flux-path /path/to/rustc-flux

About

A simple mock of the rust playground to be able to run flux on mdbook

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published