百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

go-msquic

> 编程语言
开源

QUIC/HTTP3 库是围绕 msquic 而构建的封装

100 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

QUIC/HTTP3 库是围绕 msquic 而构建的封装

go-msquic

go-msquic is a Go wrapper for the Microsoft's QUIC library, providing Go developers with an easy interface to work with QUIC-based protocols such as HTTP/3. go-msquic API is inspired from quic-go and can be used as a drop-in replacement. Unless you are ready to deal with C libraries, we do actually recommend quic-go over go-msquic.

Prerequisite

Local MsQuic Build

Before all, it is necessary to have a local MsQuic C library build. go-msquic relies on CGO and needs both C headers & the library (shared or static, see below).

  • First, get MsQuic via:
bash
git clone https://github.com/microsoft/msquic
cd msquic
git submodule update --init --recursive
  • For a static build (libmsquic.a), do the following:
bash
mkdir build-static
cd build-static
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DQUIC_BUILD_SHARED=OFF
  • Alternatively, for a dynamic build (libmsquic.so), do the following:
bash
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel
  • Then proceed with the compilation
make

Set the right package-config

Package-config is the tool used by CGO to find the headers & library automatically.

You can find package-config (.pc) file in this repository. Copy the following pcs/msquic-static.pc (for a static build) or pcs/msquic.pc (for a dynamic build) into /usr/share/pkgconfig/msquic.pc - or anywhere accessible by pkg-config tool.

Wrapper Installation

To install go-msquic, ensure you have Go installed on your system. Then run the following command to install the package:

bash
go get github.com/noboruma/go-msquic

And use in code via:

import "github.com/noboruma/go-msquic/pkg/quic"

If the prerequisites are done properly, you can now compile your Go project relying on go-msquic with CGO_ENABLED=1 and start using msquic.

Example

There is a client & server code in the sample/ directory.

License

MIT License

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Go

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言