{"id":26479384,"url":"https://github.com/fastn-stack/ft-sdk","last_synced_at":"2026-05-20T03:05:07.595Z","repository":{"id":228550892,"uuid":"774252029","full_name":"fastn-stack/ft-sdk","owner":"fastn-stack","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-11T07:27:08.000Z","size":1592,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-20T09:16:50.775Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fastn-stack.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"licenses/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":"2024-03-19T08:08:42.000Z","updated_at":"2024-11-24T13:19:53.000Z","dependencies_parsed_at":"2024-03-19T11:34:17.939Z","dependency_job_id":"5436b6e4-8cf3-40ff-a423-a163f4aef7ce","html_url":"https://github.com/fastn-stack/ft-sdk","commit_stats":null,"previous_names":["fifthtry/ft-sdk"],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastn-stack%2Fft-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastn-stack%2Fft-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastn-stack%2Fft-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastn-stack%2Fft-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fastn-stack","download_url":"https://codeload.github.com/fastn-stack/ft-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244535040,"owners_count":20468152,"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":[],"created_at":"2025-03-20T01:41:28.827Z","updated_at":"2026-05-20T03:05:07.577Z","avatar_url":"https://github.com/fastn-stack.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ft-sdk\nRust SDK for extending backend functionality of\n[fastn](https://github.com/fastn-stack/fastn/) using WASM modules.\n\n[docs.rs/ft-sdk](https://docs.rs/ft-sdk)\n\n\u003e [!NOTE]\n\u003e This crate should only be used when compiled to wasm.\n---\n\n## Example\n\n```rust\n// lib.rs\n\n// An http handler available at /\u003cmountpoint\u003e/hello-world/\n#[ft_sdk::processor]\nfn hello_world(path: ft_sdk::Path) -\u003e ft_sdk::processor::Result {\n    ft_sdk::println!(\"params: {path}\");\n    // Return a JSON string as response. Complex json with `serde_json::json!`\n    // or any Serializable struct is supported.\n    ft_sdk::processor::json(\"and this is coming from wasm!\")\n}\n```\n\nCompile the rust project with target `wasm32-unknown-unknown` and copy the\n`.wasm` file into your fastn package.\n\nYou can then mount this module by adding the following to your `FASTN.ftd`\nfile:\n\n```ftd\n-- import: fastn\n\n-- fastn.package: hello-world\n\n-- fastn.url-mappings:\n\n/wasm/* -\u003e wasm+proxy://hello_world.wasm/*\n```\n\nNow any `.ftd` file can make request to `/wasm/hello-world/` and it will be\nhandled by the `hello_world` function in the wasm module:\n\n```ftd\n-- import: fastn/processors as pr\n\n-- ftd.text: this is in ftd file\n-- ftd.text: $message\n\n-- string message:\n$processor$: pr.http\nurl: /wasm/hello-world/\n```\n\nSee [./examples/](./examples/) for more examples including form handling and\ninteracting with database using the\n[diesel](https://github.com/diesel-rs/diesel) crate.\n\n## Maintenance Note\n\nRun `scripts/check.sh` before release.\n\n## ft-stripe\n\nThis project provides integration with Stripe HTTP APIs. It is based on the\n[async-stripe](https://github.com/arlyon/async-stripe/tree/0a00d31894191ee0c6b4bda31e0d52d59e8e93b7)\nproject, with its own implementation of a Client to call Stripe APIs.\n\n### License\n\nThis project includes many source files copied from\n[async-stripe](https://github.com/arlyon/async-stripe/tree/0a00d31894191ee0c6b4bda31e0d52d59e8e93b7).\nWe acknowledge and are grateful to the developers of async-stripe for their\ncontributions to open source.\n\nLicensed under either of\n\n- Apache License, Version 2.0,\n  ([LICENSE-APACHE](https://github.com/arlyon/async-stripe/blob/0a00d31894191ee0c6b4bda31e0d52d59e8e93b7/LICENSE-APACHE)\n  or https://www.apache.org/licenses/LICENSE-2.0)\n- MIT license\n  ([LICENSE-MIT](https://github.com/arlyon/async-stripe/blob/0a00d31894191ee0c6b4bda31e0d52d59e8e93b7/LICENSE-MIT)\n  or\n  https://opensource.org/licenses/MIT) at your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastn-stack%2Fft-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffastn-stack%2Fft-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastn-stack%2Fft-sdk/lists"}