https://github.com/madskjeldgaard/puredata-rust-template
A template to create Rust-based Pure Data externals
https://github.com/madskjeldgaard/puredata-rust-template
cargo cargo-generate pd puredata rust
Last synced: 5 months ago
JSON representation
A template to create Rust-based Pure Data externals
- Host: GitHub
- URL: https://github.com/madskjeldgaard/puredata-rust-template
- Owner: madskjeldgaard
- License: mit
- Created: 2024-03-12T11:19:27.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-15T08:55:28.000Z (over 1 year ago)
- Last Synced: 2025-03-31T12:01:41.309Z (6 months ago)
- Topics: cargo, cargo-generate, pd, puredata, rust
- Language: Rust
- Homepage:
- Size: 15.6 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Generate a Rust-based external for Pure Data
This is a cargo generate template to create a Pure Data external written entirely in Rust.
It uses [puredata-rust](https://github.com/x37v/puredata-rust).
## Usage:
You need to have [cargo-generate](https://github.com/cargo-generate/cargo-generate) and [cargo-make](https://github.com/sagiegurari/cargo-make) installed to run these commands.
Install them using cargo before procedeeding:
```bash
cargo install cargo-generate
cargo install cargo-make
```### Generating a new project
```bash
cargo generate madskjeldgaard/puredata-rust-template
cd
```### Building
Please note: All build commands use the debug profile by default. For DSP, this is EXTREMELY slow. Therefore, make sure to use the release profile correctly when you need to have an optimized version of your external.
For debug builds:
```bash
cargo make build
``````bash
cargo make --profile release build
```### Running the external in PureData
At the root of the project is a .pd file you can open to test the external.
Run it using cargo make:
```bash
cargo make run
```If you want to run the release version:
```bash
cargo make --profile release run
```### Install the external
If you have [plugdata](https://plugdata.org/) installed (on MacOS), this will install the external to the plugdata externals folder, otherwise the Pd-externals folder in your home directory. On Linux it will simply copy it to `~/pd-externals`
```bash
cargo make --profile release install
```### Making a Deken package
The make file also includes a task to create a Deken package to be used in the [Pure Data externals database](https://deken.puredata.info/).
```bash
cargo make --profile release package
```### Upload to Deken
```bash
cargo make --profile release upload
```