{"id":14967182,"url":"https://github.com/golemcloud/sbt-wasm-component","last_synced_at":"2025-10-25T17:31:40.055Z","repository":{"id":230882359,"uuid":"701030480","full_name":"golemcloud/sbt-wasm-component","owner":"golemcloud","description":"Create easily your Golem workers from Scala","archived":false,"fork":false,"pushed_at":"2024-05-10T18:04:51.000Z","size":22,"stargazers_count":1,"open_issues_count":3,"forks_count":3,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-05-11T01:26:26.807Z","etag":null,"topics":["golem","golem-cloud","scala","scala-plugin"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/golemcloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-10-05T19:10:46.000Z","updated_at":"2024-05-30T08:15:14.598Z","dependencies_parsed_at":"2024-05-30T08:25:14.617Z","dependency_job_id":null,"html_url":"https://github.com/golemcloud/sbt-wasm-component","commit_stats":null,"previous_names":["golemcloud/golem-scala","golemcloud/sbt-wasm-component"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golemcloud%2Fsbt-wasm-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golemcloud%2Fsbt-wasm-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golemcloud%2Fsbt-wasm-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golemcloud%2Fsbt-wasm-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/golemcloud","download_url":"https://codeload.github.com/golemcloud/sbt-wasm-component/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219865216,"owners_count":16555929,"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":["golem","golem-cloud","scala","scala-plugin"],"created_at":"2024-09-24T13:37:35.211Z","updated_at":"2025-10-25T17:31:39.705Z","avatar_url":"https://github.com/golemcloud.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"sbt-wasm-component\n==================\n\nAvoid any boilerplate in your project by using just one annotation to export your Golem worker from Scala to JS.\n\nSetup\n-----\n\nAdd sbt-wasm-component as a dependency in `project/plugins.sbt`:\n\n```scala\naddSbtPlugin(\"cloud.golem\" % \"sbt-wasm-component\" % \"x.y.z\")\n```\n\nUsage\n-----\n\nThe WASM component plugin is automatically loaded, it just needs to be enabled with `enablePlugins(WasmComponentPlugin)` in your `build.sbt`:\n\n```scala\nThisBuild / version := \"0.1.0-SNAPSHOT\"\nThisBuild / scalaVersion := \"2.13.13\"\n\nlazy val root = (project in file(\".\"))\n  .enablePlugins(WasmComponentPlugin)\n```\n\nThen you will be able to annotate your Golem worker object with the `@cloud.golem.WitExport` annotation:\n\n```scala\npackage example\n\n@cloud.golem.WitExport\nobject ShoppingCart { self =\u003e\n\n  def initializeCart(userId: String): String = {\n    println(s\"Initializing cart for user $userId\")\n    if (math.random() \u003e 0.1) userId\n    else \"Error while initializing cart\"\n  }\n  \n  // ...\n\n}\n\n```\n\nOnce done that, it will be enough to run `sbt wasmComponent` and the plugin will take care of exporting your worker in WASM.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolemcloud%2Fsbt-wasm-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgolemcloud%2Fsbt-wasm-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolemcloud%2Fsbt-wasm-component/lists"}