{"id":19564484,"url":"https://github.com/dioxuslabs/playground","last_synced_at":"2025-04-27T00:33:03.463Z","repository":{"id":240419748,"uuid":"802345715","full_name":"DioxusLabs/playground","owner":"DioxusLabs","description":"[moved] A playground akin to the Rust playground but for Dioxus.","archived":true,"fork":false,"pushed_at":"2025-02-05T00:03:42.000Z","size":10629,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-26T21:03:56.143Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/DioxusLabs/docsite/tree/main/packages/playground","language":"Rust","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/DioxusLabs.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}},"created_at":"2024-05-18T03:42:53.000Z","updated_at":"2025-04-04T03:05:38.000Z","dependencies_parsed_at":"2024-05-22T22:23:52.290Z","dependency_job_id":"90f7a533-38ec-4fa0-97f9-e9988543b22d","html_url":"https://github.com/DioxusLabs/playground","commit_stats":null,"previous_names":["dogedark/dioxus-playground","dioxuslabs/playground"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DioxusLabs%2Fplayground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DioxusLabs%2Fplayground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DioxusLabs%2Fplayground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DioxusLabs%2Fplayground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DioxusLabs","download_url":"https://codeload.github.com/DioxusLabs/playground/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251073596,"owners_count":21532005,"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","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":[],"created_at":"2024-11-11T05:22:12.666Z","updated_at":"2025-04-27T00:33:03.447Z","avatar_url":"https://github.com/DioxusLabs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# This repo has moved!\n\nhttps://github.com/DioxusLabs/docsite/tree/main/packages/playground\n\n## Dioxus Playground\nDioxus Playground is a code playground similar to the Rust playground except it is tailored specifically for Dioxus and it's features.\n\n### Design\nThe playground is in a Cargo workspace with:\n- `playground`: the playground component library.\n- `server`: an axum server that runs the build logic.\n- `model`: shared structures for communicating between web and server.\n- `runner`: currently wraps around the playground component to run it.\n\n**Build Flow:**\n1. User submits code\n2. The code is added to a compilation queue\n3. The server compiles the code one at a time with the same cached dependencies. (dioxus)\n4. The server stores the compiled wasm and provides a temporary url to the page.\n5. The server deletes the wasm after a duration from being built.\n\n\n### Component Usage\nSimply include and use the `Playground {}` component wherever you want. \nIf you want share functionality, you will need to wire up Dioxus router for `playgroundUrlPrefix/:share_code`.\n\n### Share Functionality\nThe share functionality requires no server. It simply takes the code, compresses it with `miniz_oxide`, and Base64 encodes it.\n\n### Server Environment Variables\nMost of these are already set in the `Dockerfile` and shouldn't need modified.\n```\n# The port the server should listen to.\nPORT = 3000\n\n# Whether the server should run in produce mode. This informs the server to use forwarded ip addresses.\nPRODUCTION = false\n\n# The build template that should be used.\nBUILD_TEMPLATE_PATH = \"/usr/local/bin/template\"\n\n# If specified, shuts down the server after X ms since the last http request.\nSHUTDOWN_DELAY = null\n```\n\n### Licenses\nAll `dioxus-playground` code is licensed under [MIT](./LICENSE-MIT) or [Apache 2.0](./LICENSE-APACHE). \n\nThis project includes 3rd party assets which may have their own licensing requirements. For more information, see the [licenses readme](./LICENSES/README.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdioxuslabs%2Fplayground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdioxuslabs%2Fplayground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdioxuslabs%2Fplayground/lists"}