{"id":31923315,"url":"https://github.com/fuellabs/sway-playground","last_synced_at":"2025-10-13T23:49:20.483Z","repository":{"id":103103256,"uuid":"580927461","full_name":"FuelLabs/sway-playground","owner":"FuelLabs","description":"🌴▶️ Sway in the browser","archived":false,"fork":false,"pushed_at":"2025-09-22T17:53:17.000Z","size":18920,"stargazers_count":67,"open_issues_count":18,"forks_count":28,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-09-22T19:35:45.293Z","etag":null,"topics":["browser","playground","sway"],"latest_commit_sha":null,"homepage":"https://sway-playground.org","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FuelLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-12-21T20:13:19.000Z","updated_at":"2025-09-22T17:53:20.000Z","dependencies_parsed_at":"2024-02-10T01:29:11.734Z","dependency_job_id":"83c0d3ca-f4c1-4e6a-b941-ef03bf15c38f","html_url":"https://github.com/FuelLabs/sway-playground","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FuelLabs/sway-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuelLabs%2Fsway-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuelLabs%2Fsway-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuelLabs%2Fsway-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuelLabs%2Fsway-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FuelLabs","download_url":"https://codeload.github.com/FuelLabs/sway-playground/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuelLabs%2Fsway-playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017229,"owners_count":26086016,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser","playground","sway"],"created_at":"2025-10-13T23:49:16.515Z","updated_at":"2025-10-13T23:49:20.474Z","avatar_url":"https://github.com/FuelLabs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sway Playground\n\n[![docs](https://docs.rs/forc/badge.svg)](https://docs.rs/forc/)\n[![discord](https://img.shields.io/badge/chat%20on-discord-orange?\u0026logo=discord\u0026logoColor=ffffff\u0026color=7389D8\u0026labelColor=6A7EC2)](https://discord.gg/xfpK4Pe)\n\nSway Playground enables developers to build simple sway contracts in the browser with no installation of tools. This tool is inspired by the Ethereum remix tool or the Rust Playground.\n\n## Try it Now!\n\n[sway-playground.org](https://sway-playground.org)\n\n## How it Works\n\nSway Playground has a simple multi-threaded Rocket backend server which creates a temp project per compile request, builds the project, removes the temp files and returns the output.\n\nThe frontend uses React and typescript with Ace editor.\n\n## Sway Documentation\n\nFor user documentation, including installing release builds, see the Sway Book: \u003chttps://fuellabs.github.io/sway/latest/\u003e.\n\n## Building from Source\n\nThis section is for developing the Sway Playground. For developing contracts and using Sway, see the above documentation section.\n\n### Dependencies\n\nSway Playground is built in Rust and Javascript. To begin, install the Rust toolchain following instructions at \u003chttps://www.rust-lang.org/tools/install\u003e. Then configure your Rust toolchain to use Rust `stable`:\n\n```sh\nrustup default stable\n```\n\nIf not already done, add the Cargo bin directory to your `PATH` by adding the following line to `~/.profile` and restarting the shell session.\n\n```sh\nexport PATH=\"${HOME}/.cargo/bin:${PATH}\"\n```\n\n### Building Sway Playground\n\nClone the repository and build the Sway toolchain:\n\n```sh\ngit clone git@github.com:FuelLabs/sway-playground.git\ncd sway-playground\ncargo build\n```\n\nConfirm the Sway Playground built successfully:\n\n```sh\ncargo run --bin sway-playground\n```\n\n### Running the Sway Compiler Server\n\nThe server is a simple Hyper server for now.\n\n```sh\ncargo run\n```\n\nAlternatively, it can be run locally with Docker, as it is in the deployed environment.\n\n```sh\n# forc is not fully supported on arm linux, see https://github.com/FuelLabs/sway/issues/5760\ndocker buildx build --platform linux/amd64 -f deployment/Dockerfile .\ndocker run -p 8080:8080 -d \u003cimage-sha\u003e\n```\n\n### Running the Frontend\n\nThe frontend is just a simple static frontend and can be hosted anywhere.\n\n```sh\ncd app\nnpm start\n```\n\nThis will open http://localhost:3000 in your browser. By default, it will use the production backend endpoint. \n\nTo test against the backend running locally, you can use the environment variable `REACT_APP_LOCAL_SERVER` when you start the app, like this:\n\n```sh\nREACT_APP_LOCAL_SERVER=true npm start\n```\n\n## Contributing to Sway\n\nWe welcome contributions to Sway Playground, for general contributing guidelines please consult the Sway Contributing Documentation for now.\n\nPlease see the [Contributing To Sway](https://docs.fuel.network/docs/sway/reference/contributing_to_sway/) section of the Sway book for guidelines and instructions to help you get started.\n\n## Todo\n\n- UI design in line with other Fuel apps.\n- Ace Editor support for Sway syntax highlighting.\n- Ensuring IO non-blocking (not sure if the server is truly non-blocking and multi-threaded), might need tokio IO.\n- Better CI to always make available the latest stable version of Sway.\n- Support for deploying and testing contracts.\n- React unit tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuellabs%2Fsway-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuellabs%2Fsway-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuellabs%2Fsway-playground/lists"}