{"id":16825345,"url":"https://github.com/tychedelia/td-rs","last_synced_at":"2025-03-17T04:31:24.961Z","repository":{"id":100181100,"uuid":"430162381","full_name":"tychedelia/td-rs","owner":"tychedelia","description":"🦀 Rust plugin framework for TouchDesigner","archived":false,"fork":false,"pushed_at":"2024-04-20T19:53:28.000Z","size":65047,"stargazers_count":33,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-14T11:13:31.331Z","etag":null,"topics":["rust","touchdesigner"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/tychedelia.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}},"created_at":"2021-11-20T17:09:24.000Z","updated_at":"2024-10-11T20:51:39.000Z","dependencies_parsed_at":"2023-12-21T21:25:48.576Z","dependency_job_id":"a82633f6-8c29-4400-b567-568d44574f93","html_url":"https://github.com/tychedelia/td-rs","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/tychedelia%2Ftd-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tychedelia%2Ftd-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tychedelia%2Ftd-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tychedelia%2Ftd-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tychedelia","download_url":"https://codeload.github.com/tychedelia/td-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221671756,"owners_count":16861305,"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","touchdesigner"],"created_at":"2024-10-13T11:13:30.183Z","updated_at":"2025-03-17T04:31:24.955Z","avatar_url":"https://github.com/tychedelia.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `td-rs` 🎨👩‍💻 ![example workflow](https://github.com/tychedelia/td-rs/actions/workflows/build.yaml/badge.svg)\n\nExperiments integrating Rust into TouchDesigner's plugin framework.\n\n## Version compatibility \n\nThe library is currently intended to be used with TouchDesigner version `2023.12000`.\n\n## Getting started\n\nFork and clone this repository. Plugins are built using the build system described below. New plugins\ncan be added by creating a new directory in `plugins/` and adding it to root `Cargo.toml` as a workspace\nmember.\n\nA plugin's `Cargo.toml` should have the following properties:\n- `name` - The name of the plugin. This should be unique across all plugins.\n- `lib` - The type of crate. This should be set to `staticlib`. The name of the lib should be the same as the\n  `package.name` property, but with underscores instead of hyphens.\n- `package.metadata.td-rs` - The `type` should be set to the operator type, e.g. `top`, `chop`, `sop`, `dat`.\n  This is used by the build system to generate the correct C++ code.\n- A dependency on the parent chop crate, e.g. `td-rs-chop = { path = \"../../../td-rs-chop\" }`. \n\nAll plugins must call their plugin constructor macro in their `lib.rs` file. For example, a `chop` plugin\nwould call `chop_plugin!(PluginName)`. This macro will generate the necessary FFI code to register the plugin\nwith TouchDesigner.\n\nSee example plugins for reference. A good starting point can be just to copy an existing plugin.\n\n### Features\n\nThe following features are available for all parent operator dependencies:\n- `python` - Enable Python support. This can be used in combination with `td-rs-derive-py` to generate \n  Python bindings for the plugin.\n- `tracing` - Enable tracing support using the [`tracing`](https://crates.io/crates/tracing) crate. This\n  can be used to log messages to the TouchDesigner console.\n- `tokio` - Enable Tokio support. This can be used to spawn asynchronous tasks from the plugin from the shared\n  Tokio runtime exported as `RUNTIME`.\n\n## ⚠️ Status ⚠️\n\nThis project should be considered in **alpha** status. It is not yet ready for production use, however\nis mostly stable and usable for experimentation. Please file an issue if you encounter any problems,\nas it is our goal to make this project viable for production use.\n\nIn particular, users may experience any of the following:\n- Crashes\n- Memory leaks\n- Missing APIs\n- Performance issues\n- Incomplete documentation\n- Breaking changes\n- Violations of Rust's aliasing rules leading to [scary things](https://predr.ag/blog/falsehoods-programmers-believe-about-undefined-behavior/)\n\nIn other words, no warranty is provided, express or implied.\n\n## Structure\n\nUsing `autocxx` we generate a C++ interface or \"bridge\" to our Rust library, which is then compiled\ninto a C++ plugin that can be loaded in TouchDesigner.\n\n## Build\n\n`cargo-xtask` is used for the build framework. A [`justfile`](./justfile) is also provided.\n\n### Dev/Watch Command\n\nYou can use [bacon](https://dystroy.org/bacon) to watch for changes and build + install for you.\n\n1. `cargo install bacon`\n2. `just dev \u003cname\u003e` or `bacon dev -- \u003cname\u003e`\n\n### `cargo-xtask`\n\n- `cargo xtask build $PLUGIN` - Build the plugin for the current platform.\n- `cargo xtask install $PLUGIN` - Install a built plugin to the TouchDesigner plugins directory.\n- `cargo xtask list-plugins` - List all available plugins.\n\n### Windows\n\n#### Dependencies\n- TouchDesigner, installed in the default location (`C:\\Program Files\\Derivative\\TouchDesigner`).\n- MSVC toolchain (Desktop C++, including Clang from additional components). Note: it may be necessary to set the\n  `LIBCLANG_PATH` environment variable to the path of the Clang DLL. This can be found in the Visual Studio\n    installation directory, e.g. `C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\Llvm\\bin`.\n- Rust `x86_64-pc-windows-msvc` target.\n\n### macOS\n\nCurrently only supports aarch64 (Apple Silicon) builds. Submit a PR if you'd like to add support for x86_64.\n\n#### Dependencies\n- TouchDesigner, installed in the default location (`/Applications/TouchDesigner.app`).\n- Xcode (installable from App Store).\n\n---\nTouchDesigner is a registered trademark of Derivative Inc. This project is not affiliated with or endorsed \nby Derivative Inc. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftychedelia%2Ftd-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftychedelia%2Ftd-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftychedelia%2Ftd-rs/lists"}