{"id":17087435,"url":"https://github.com/rrbutani/xterm-js-sys","last_synced_at":"2025-04-12T21:10:18.438Z","repository":{"id":57672602,"uuid":"258663004","full_name":"rrbutani/xterm-js-sys","owner":"rrbutani","description":"Rust bindings for Xterm.js","archived":false,"fork":false,"pushed_at":"2020-08-18T02:19:53.000Z","size":2802,"stargazers_count":34,"open_issues_count":13,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T16:14:41.998Z","etag":null,"topics":["rust","tui","webassembly","xterm-js"],"latest_commit_sha":null,"homepage":"https://rrbutani.github.io/xterm-js-sys/examples","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rrbutani.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-25T01:36:52.000Z","updated_at":"2025-02-07T10:38:26.000Z","dependencies_parsed_at":"2022-08-31T11:13:56.852Z","dependency_job_id":null,"html_url":"https://github.com/rrbutani/xterm-js-sys","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrbutani%2Fxterm-js-sys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrbutani%2Fxterm-js-sys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrbutani%2Fxterm-js-sys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrbutani%2Fxterm-js-sys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rrbutani","download_url":"https://codeload.github.com/rrbutani/xterm-js-sys/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631676,"owners_count":21136562,"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":["rust","tui","webassembly","xterm-js"],"created_at":"2024-10-14T13:33:14.537Z","updated_at":"2025-04-12T21:10:18.412Z","avatar_url":"https://github.com/rrbutani.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"## xterm-js-sys\n\n[![Build Status][ci]][actions] [![License: MIT][license-badge]][license] [![crates.io][crates-badge]][crates] [![API Docs][docs-badge]][docs]\n\nRust bindings for [xterm.js][xterm].\n\n[![`xterm-js-sys` `with-input` demo][with-input-gif]][with-input-demo]\n\n[with-input-gif]: https://raw.githubusercontent.com/wiki/rrbutani/xterm-js-sys/assets/xterm-js-sys-demo-loop.gif\n[with-input-demo]: https://rrbutani.github.io/xterm-js-sys/examples/with-input/index.html\n\n## Features\n\nCurrently this covers most of the [xterm.js API](https://github.com/xtermjs/xterm.js/blob/master/typings/xterm.d.ts).\n\nThis crate has two features:\n   - `ext`: Adds some nicer, more rust-y functions on top of the core bindings; all the functions are in [this module][ext].\n   - `crossterm-support`: Provides a wrapper type that let's [`crossterm`][crossterm] use xterm.js as a backend (located [here][crossterm-support]). This enables xterm.js to be used with, for example,the [tui][tui] crate. Usually you won't have to enable this feature yourself; you _should_ be able to just use [`crossterm`][crossterm] and pass it a [`Terminal`].\n\nThis crate also does support the infrastructure [xterm.js][xterm] has for [addons](https://github.com/xtermjs/xterm.js#addons). It also lets you [define your own addons in Rust][addon-ext-docs], if you'd like. Currently only the [xterm-addon-fit](https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-fit) package has [Rust bindings][fit-addon]. If you do end up making bindings for an [xterm.js][xterm] addon (or your own addon in Rust), feel free to send in a PR to update this list!\n\n### xterm.js addons\n\nFirst party addon packages:\n  - [attach][attach]: [xterm-js-addon-attach-sys][attach-addon]\n  - [fit][fit]: [xterm-js-addon-fit-sys][fit-addon]\n  - [search][search]: [xterm-js-addon-search-sys][search-addon]\n  - [serialize][serialize]: [xterm-js-addon-serialize-sys][serialize-addon]\n  - [unicode11][unicode11]: [xterm-js-addon-unicode11-sys][unicode11-addon]\n  - [web-links][web-links]: [xterm-js-addon-web-links-sys][web-link-addon]\n  - [webgl][webgl]: [xterm-js-addon-webgl-sys][webgl-addon]\n\n[attach]: https://www.npmjs.com/package/xterm-addon-attach\n[fit]: https://www.npmjs.com/package/xterm-addon-fit\n[search]: https://www.npmjs.com/package/xterm-addon-search\n[serialize]: https://www.npmjs.com/package/xterm-addon-serialize\n[unicode11]: https://www.npmjs.com/package/xterm-addon-unicode11\n[web-links]: https://www.npmjs.com/package/xterm-addon-web-links\n[webgl]: https://www.npmjs.com/package/xterm-addon-webgl\n\n## Usage\n\nAdd this to your `Cargo.toml`:\n```TOML\n[dependencies]\nxterm-js-sys = \"4.6.0-alpha1\"\n```\n\nAnd make sure that your bundler/JS package manager is set to grab the corresponding verison of the [xterm.js][xterm] package. The examples in this repo use [parcel][parcel] for which all that's needed is adding `xterm` to your [`package.json`][package.json]:\n```JSON\n  \"dependencies\": {\n    \"xterm\": \"^4.6.0\"\n  }\n```\n\nMake sure you also add the packages for any addons you're using; see our [examples' `package.json`][package.json] for an example.\n\nThe [xterm.js documentation](https://xtermjs.org/docs/) is a good reference for actual usage of the API; these bindings are usually one to one. Though, as of this writing, the xterm.js docs still correspond to version 4.4.\n\n## Examples\n\nThis repo has a [few examples][examples-src] that show usage of the bindings, usage with the `ext` feature, and usage with [`crossterm`][crossterm] and the [`tui`][tui] crate.\n\nTo build these, enter the folder of the example you wish to run (i.e. [examples/basic][examples-src-basic]) and:\n  - install the packages (`npm i` or `yarn install`)\n  - run the watch script (`npm run watch` or `yarn run watch`)\n\nIt should (hopefully) just work! 🤞\n\nThese examples are also deployed [here][examples].\n\n## Minimum Supported Rust Version (MSRV)\n\nThis crate is currently guaranteed to compile on stable Rust 1.43 and newer. We offer no guarantees that this will remain true in future releases but do promise to always support (at minimum) the latest stable Rust version and to document changes to the MSRV in the [changelog][changelog].\n\n## Contributing\n\nPRs are (very) welcome!\n\n[ci]: https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Frrbutani%2Fxterm-js-sys%2Fbadge%3Fref%3Dmain\u0026style=for-the-badge\u0026labelColor=505050\u0026color=A0CB8D\n[license-badge]: https://img.shields.io/github/license/rrbutani/xterm-js-sys?style=for-the-badge\u0026logo=GNU\u0026labelColor=505050\u0026color=998DCB\n[crates-badge]: https://img.shields.io/crates/v/xterm-js-sys?style=for-the-badge\u0026logo=rust\u0026labelColor=505050\u0026color=CB8DA0\n[docs-badge]: https://img.shields.io/badge/docs-latest-blue.svg?style=for-the-badge\u0026logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGZpbGw9IiNmNWY1ZjUiIGQ9Ik00ODguNiAyNTAuMkwzOTIgMjE0VjEwNS41YzAtMTUtOS4zLTI4LjQtMjMuNC0zMy43bC0xMDAtMzcuNWMtOC4xLTMuMS0xNy4xLTMuMS0yNS4zIDBsLTEwMCAzNy41Yy0xNC4xIDUuMy0yMy40IDE4LjctMjMuNCAzMy43VjIxNGwtOTYuNiAzNi4yQzkuMyAyNTUuNSAwIDI2OC45IDAgMjgzLjlWMzk0YzAgMTMuNiA3LjcgMjYuMSAxOS45IDMyLjJsMTAwIDUwYzEwLjEgNS4xIDIyLjEgNS4xIDMyLjIgMGwxMDMuOS01MiAxMDMuOSA1MmMxMC4xIDUuMSAyMi4xIDUuMSAzMi4yIDBsMTAwLTUwYzEyLjItNi4xIDE5LjktMTguNiAxOS45LTMyLjJWMjgzLjljMC0xNS05LjMtMjguNC0yMy40LTMzLjd6TTM1OCAyMTQuOGwtODUgMzEuOXYtNjguMmw4NS0zN3Y3My4zek0xNTQgMTA0LjFsMTAyLTM4LjIgMTAyIDM4LjJ2LjZsLTEwMiA0MS40LTEwMi00MS40di0uNnptODQgMjkxLjFsLTg1IDQyLjV2LTc5LjFsODUtMzguOHY3NS40em0wLTExMmwtMTAyIDQxLjQtMTAyLTQxLjR2LS42bDEwMi0zOC4yIDEwMiAzOC4ydi42em0yNDAgMTEybC04NSA0Mi41di03OS4xbDg1LTM4Ljh2NzUuNHptMC0xMTJsLTEwMiA0MS40LTEwMi00MS40di0uNmwxMDItMzguMiAxMDIgMzguMnYuNnoiPjwvcGF0aD48L3N2Zz4K\u0026labelColor=505050\u0026color=8DBFCB\n\n\n[changelog]: https://github.com/rrbutani/xterm-js-sys/tree/main/CHANGELOG.md\n\n[actions]: https://github.com/rrbutani/xterm-js-sys/actions\n[license]: https://opensource.org/licenses/MIT\n[crates]: https://crates.io/crates/xterm-js-sys\n[docs]: https://rrbutani.github.io/xterm-js-sys/docs/xterm_js_sys\n\n[ext]: https://github.com/rrbutani/xterm-js-sys/tree/main/src/ext/\n[crossterm-support]: https://github.com/rrbutani/xterm-js-sys/tree/main/src/crossterm_support/\n\n[addon-ext-docs]: https://rrbutani.github.io/xterm-js-sys/docs/xterm_js_sys/ext/addon/trait.XtermAddon.html\n\n[examples]: https://rrbutani.github.io/xterm-js-sys/examples\n[examples-src]: https://github.com/rrbutani/xterm-js-sys/tree/main/examples\n[examples-src-basic]: https://github.com/rrbutani/xterm-js-sys/tree/main/examples/basic\n[package.json]: (https://github.com/rrbutani/xterm-js-sys/tree/main/examples/package.json)\n\n[xterm]: https://github.com/xtermjs/xterm.js/\n[crossterm]: https://github.com/crossterm-rs/crossterm\n[tui]: https://github.com/fdehau/tui-rs\n[parcel]: https://parceljs.org/\n\n[attach-addon]: https://github.com/rrbutani/xterm-js-sys-addons/tree/main/attach\n[fit-addon]: https://github.com/rrbutani/xterm-js-sys-addons/tree/main/fit\n[search-addon]: https://github.com/rrbutani/xterm-js-sys-addons/tree/main/search\n[serialize-addon]: https://github.com/rrbutani/xterm-js-sys-addons/tree/main/serialize\n[unicode11-addon]: https://github.com/rrbutani/xterm-js-sys-addons/tree/main/unicode11\n[web-link-addon]: https://github.com/rrbutani/xterm-js-sys-addons/tree/main/web-link\n[webgl-addon]: https://github.com/rrbutani/xterm-js-sys-addons/tree/main/webgl\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrbutani%2Fxterm-js-sys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frrbutani%2Fxterm-js-sys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrbutani%2Fxterm-js-sys/lists"}