Skip to content

Wasm-based codepath to run without cgo #103

@anuraaga

Description

@anuraaga

I have developed a version of pgquery for Go that uses WebAssembly and wazero

https://github.com/wasilibs/go-pgquery

This means that it enable the library to be used without cgo, notably meaning no warnings when building after a MacOS upgrade and full windows support. I have been able to use it to remove platform constraints from sqlc

sqlc-dev/sqlc#3027

I wanted to check if there is any interest in upstreaming that technique into this repository, in which case I would be happy to archive that project. WebAssembly is quite gnarly, so I don't know if I particularly recommend it and run into possible maintenance issues, though I'd be happy to help when needed. More practical may be to keep that separate and make sure the types are compatible to allow easy switching. I have verified that with #102 I can switch go-pgquery to return the proto from this package in its public API without issue.

I wanted to share the idea and provide context on recent changes and happy to hear any thoughts on what could work well for this project.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions