Skip to content

Conversation

@gdams
Copy link
Collaborator

@gdams gdams commented Sep 17, 2025

cgoless wrappers are gated behind a build tag for now and not used in the root package.

@gdams gdams force-pushed the dev/gadams/cgoless branch from 1bff9e1 to 51e901b Compare September 17, 2025 16:38
@gdams gdams marked this pull request as ready for review October 8, 2025 13:33
@qmuntal qmuntal requested review from dagood and karianna October 9, 2025 08:02
@qmuntal qmuntal force-pushed the dev/gadams/cgoless branch from 994a7f6 to fa14adf Compare October 9, 2025 08:36
@qmuntal qmuntal requested a review from Copilot October 9, 2025 11:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements cgoless wrappers for OpenSSL C functions to enable building Go applications with OpenSSL support without requiring CGO. This is a significant architectural enhancement that provides an alternative implementation path.

  • Adds a new nocgo mode to the mkcgo tool for generating CGO-free wrapper code
  • Implements dynamic library loading using syscalls instead of CGO for OpenSSL functions
  • Provides platform-specific assembly code for system call handling on AMD64 and ARM64

Reviewed Changes

Copilot reviewed 51 out of 52 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
internal/ossl/zossl_nocgo.go Generated nocgo wrapper functions that call OpenSSL via syscalls
internal/ossl/zossl_cgo.go Extracted CGO-specific wrapper functions from main file
internal/ossl/zossl.go Refactored to contain only constants and shared utilities
internal/ossl/syscall_nocgo_*.go Platform-specific syscall implementations for nocgo mode
internal/ossl/asm_*.s Assembly trampolines for system call handling
internal/ossl/zdl_nocgo.go Dynamic library loading functions for nocgo mode
internal/ossl/errors_nocgo.go Error handling implementation for nocgo mode
internal/ossl/ossl_nocgo.go Nocgo-specific OpenSSL utility functions
internal/mkcgo/*.go Enhanced mkcgo tool to support nocgo code generation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@qmuntal qmuntal merged commit 688f589 into v2 Oct 9, 2025
52 checks passed
@gdams gdams deleted the dev/gadams/cgoless branch October 9, 2025 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants