-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Thrift Compact protocol support #19
base: main
Are you sure you want to change the base?
Conversation
- WARNING: cgocheck always disabled - Rename conflict symbol names with autogenerated CGo C-header (prologue) - GoSlice -> _GoSlice - GoString -> _GoString - GoEface -> _GoEface - GoIface -> _GoIface - Added `sharedlib` build tag - Added vscode workspace sample - tasks, launch list - build tag
Except field, and bool.
I'll add more test, there's a basic test and it's passing. I would like to know if the current state of native C codes are able to be converted to Go (via. clang macos ASM syntax and asm2asm). |
Added some tests, Thrift encoder part is passing. There's an issue with some fallback mechanism especially for HTTP mapping. |
Thanks for contributing! It will take some time to review it. |
It seems you use CGO for implementing |
We are not going to use CGo for normal usage, only for development purpose, by adding "sharedlib" to Go build tag, it's kind of temporary replacement for asm2asm as I can't manage to make it work on Linux, it can also give you nice DX when debugging the native C code (which is dynamically linked with Go), compile the native using |
If so, I am afraid that its performance is even worse than using pure Golang... BTW, we have a plan to implement |
LGTM, when can it be ready for review |
There are still some failing test for HTTP mapping path use-case, https://github.com/cloudwego/dynamicgo/blob/089a6d41bb09e503e03815c8e2d1d4a3666d2eec/conv/j2t/compact_test/failing_test.go I am not really sure on how it works with J2T FSM |
I feel like this has been stale for a while. I am going to introduce smaller changes PR, this one look kinda massive. I'll start from making the native Thrift serde as vtables, then the next one is j2t Thrift Compact FSM or maybe HTTP conv on Go side |
Sure. You can try use sonic/ast.Visitor to implement j2t as well |
What type of PR is this?
feat: Thrift Compact protocol support
What this PR does / why we need it (en: English/zh: Chinese):
en: support Thrift Compact protocol conversion
zh: 支持 Thrift Compact 转化
Which issue(s) this PR fixes: