{"id":23705339,"url":"https://github.com/yewstack/tokise","last_synced_at":"2026-03-11T13:18:19.295Z","repository":{"id":61703665,"uuid":"547345487","full_name":"yewstack/tokise","owner":"yewstack","description":"An asynchronous runtime compatible with WebAssembly and non-WebAssembly targets.","archived":false,"fork":false,"pushed_at":"2024-12-13T08:29:26.000Z","size":40,"stargazers_count":72,"open_issues_count":9,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-10-02T18:44:20.284Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/yewstack.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2022-10-07T14:27:52.000Z","updated_at":"2025-08-17T00:35:47.000Z","dependencies_parsed_at":"2024-01-23T17:32:52.504Z","dependency_job_id":"8a4590f7-0a74-40a7-ad72-39b3d342ddbc","html_url":"https://github.com/yewstack/tokise","commit_stats":null,"previous_names":["futursolo/prokio","yewstack/tokise"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/yewstack/tokise","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yewstack%2Ftokise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yewstack%2Ftokise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yewstack%2Ftokise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yewstack%2Ftokise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yewstack","download_url":"https://codeload.github.com/yewstack/tokise/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yewstack%2Ftokise/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30382669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T12:49:11.341Z","status":"ssl_error","status_checked_at":"2026-03-11T12:46:41.342Z","response_time":84,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-12-30T14:35:55.797Z","updated_at":"2026-03-11T13:18:19.280Z","avatar_url":"https://github.com/yewstack.png","language":"Rust","readme":"# Tokio x Promise = Tokise\n\nAn asynchronous runtime compatible with WebAssembly and non-WebAssembly targets.\n\n# Rationale\n\nWhen designing components and libraries that works on both WebAssembly targets backed by\nJavaScript Runtime and non-WebAssembly targets with Native Runtimes. Developers usually face\nchallenges that requires applying multiple feature flags throughout their application:\n\n1. Select I/O and timers that works with the target runtime.\n2. Native Runtimes usually require `Send` futures and WebAssembly types are usually `!Send`.\n\n# Implementation\n\nTo alleviate these issues, Tokise implements a single-threaded runtime that executes `?Send`\n(`Send` or `!Send`) futures.\n\nOn platforms with multi-threading support, tokise spawns multiple independent runtimes proportional\nto the CPU core number. When tasks are spawned with a runtime handle, it will randomly select a\nworker thread from the internal pool. All tasks spawned with `spawn_local` will run on the same thread\nas the thread the task was running. When the runtime runs in a WebAssembly target, all\ntasks will be scheduled on the main thread.\n\nThis runtime is designed in favour of IO-bounded workload with similar runtime cost.\nWhen running I/O workloads, it would produce a slightly better performance as tasks are\nnever moved to another thread. However, If a worker thread is busy,\nother threads will not be able to steal tasks scheduled on the busy thread.\nWhen you have a CPU-bounded task where CPU time is significantly\nmore expensive, it should be spawned with a dedicated thread (or Web Worker) and communicates\nwith the application using channels.\n\nTokise provides the following components:\n\n1. A Task Scheduler that is capable of running non-Send tasks.\n2. A Timer that is compatible with the scheduler backend.\n3. Task Synchronisation Mechanisms.\n\n# Runtime Backend\n\nTokise runtime is implemented with different runtimes depending on the target platform and can use\nall features (timers / IO / task synchronisation) from the selected native runtime:\n\n- `wasm-bindgen-futures` (WebAssembly targets)\n- `tokio` (non-WebAssembly targets)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyewstack%2Ftokise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyewstack%2Ftokise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyewstack%2Ftokise/lists"}