Skip to content

feat!: remove Go and Rust function templates#7957

Open
serhalp wants to merge 3 commits intomainfrom
cursor/go-rust-templates-removal-bc23
Open

feat!: remove Go and Rust function templates#7957
serhalp wants to merge 3 commits intomainfrom
cursor/go-rust-templates-removal-bc23

Conversation

@serhalp
Copy link
Member

@serhalp serhalp commented Feb 19, 2026

Summary

BREAKING: Remove Go and Rust templates from netlify functions:create command.

These are rarely used and not worth maintaining here.

Go and Rust functions are still supported; this only removes templates from the CLI.


Slack Thread

Open in Cursor Open in Web

BREAKING CHANGE: Go and Rust function templates have been removed from `netlify functions:create`.

The templates were outdated with security vulnerabilities in their dependencies,
and creating Dependabot/Renovate noise. Users who need Go or Rust functions can
still create them manually.

- Removed functions-templates/go/hello-world/ directory
- Removed functions-templates/rust/hello-world/ directory
- Removed Go and Rust from language selection in functions:create
- Updated 'Serverless function (Node/Go/Rust)' to 'Serverless function (Node)'
- Removed Rust-specific environment variable notice

Co-authored-by: Philippe Serhal <philippe.serhal@gmail.com>
@cursor
Copy link

cursor bot commented Feb 19, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@github-actions
Copy link

github-actions bot commented Feb 19, 2026

📊 Benchmark results

Comparing with 9341bd9

  • Dependency count: 1,080 (no change)
  • Package size: 347 MB (no change)
  • Number of ts-expect-error directives: 362 (no change)
@coderabbitai
Copy link

coderabbitai bot commented Feb 19, 2026

📝 Walkthrough

Summary by CodeRabbit

  • Breaking Changes
    • Removed Go and Rust serverless function template support. Only JavaScript and TypeScript runtimes are now available for creating functions.
    • Removed associated build guidance and configuration messages related to unsupported runtimes.

Walkthrough

This PR removes Go and Rust function template support from the codebase. The changes delete the complete hello-world function templates for both Go and Rust, including their metadata files (.netlify-function-template.mjs), build manifests (go.mod, Cargo.toml), and implementation files (main.go, src/main.rs). Additionally, the function creation command is updated to remove Go and Rust from the list of available languages and to remove related environment documentation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat!: remove Go and Rust function templates' clearly and specifically summarizes the main breaking change in the pull request.
Description check ✅ Passed The description is directly related to the changeset, explaining that Go and Rust templates are being removed from the netlify functions:create command while noting that the languages remain supported.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cursor/go-rust-templates-removal-bc23

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@serhalp serhalp changed the title Go rust templates removal Feb 19, 2026
@serhalp serhalp marked this pull request as ready for review February 19, 2026 15:13
@serhalp serhalp requested a review from a team as a code owner February 19, 2026 15:14
@serhalp serhalp requested review from sarahetter and removed request for a team February 19, 2026 15:14
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/commands/functions/functions-create.ts (1)

183-187: Redundant ternary — edge-function language filter is now a no-op.

With languages reduced to only [javascript, typescript], the funcType === 'edge' guard that filters out Go/Rust values is no longer needed; both branches of the ternary now produce identical arrays.

♻️ Suggested simplification
-    const langs =
-      funcType === 'edge'
-        ? languages.filter((lang) => lang.value === 'javascript' || lang.value === 'typescript')
-        : languages.filter(Boolean)
+    const langs = languages
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/commands/functions/functions-create.ts` around lines 183 - 187, The
ternary used when computing langs is redundant because languages now only
contains javascript and typescript; simplify the assignment by removing the
funcType === 'edge' branch and set langs to the common value (e.g., use
languages or languages.filter(Boolean)) where the variables language, langs,
funcType, and languages are referenced in functions-create.ts so the
edge-specific filter is eliminated.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/commands/functions/functions-create.ts`:
- Around line 183-187: The ternary used when computing langs is redundant
because languages now only contains javascript and typescript; simplify the
assignment by removing the funcType === 'edge' branch and set langs to the
common value (e.g., use languages or languages.filter(Boolean)) where the
variables language, langs, funcType, and languages are referenced in
functions-create.ts so the edge-specific filter is eliminated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants