Skip to content
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

feat: add guest binding generator for TinyGo/Go #471

Merged
merged 73 commits into from
Feb 16, 2023

Commits on Jan 31, 2023

  1. created wit-bindgen-gen-guest-go crate and added to the clap CLI

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    cc629ab View commit details
    Browse the repository at this point in the history
  2. rewrote import and export using a more generic conversion method

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    d9b2de1 View commit details
    Browse the repository at this point in the history
  3. milestone: records working

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    a6676c9 View commit details
    Browse the repository at this point in the history
  4. simply code

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    8c13f4e View commit details
    Browse the repository at this point in the history
  5. milestone: tuple works

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    8322b39 View commit details
    Browse the repository at this point in the history
  6. milestone: list works

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    58accff View commit details
    Browse the repository at this point in the history
  7. milestone: string works

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    eac3b6a View commit details
    Browse the repository at this point in the history
  8. milestone: option works

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    ca5da81 View commit details
    Browse the repository at this point in the history
  9. implemented result type

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    8714211 View commit details
    Browse the repository at this point in the history
  10. milestone: result works

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    2f2f6b3 View commit details
    Browse the repository at this point in the history
  11. milestone: result option work

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    1bd4170 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    e589640 View commit details
    Browse the repository at this point in the history
  13. get more tests passed, including conventions

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    8e4e7e4 View commit details
    Browse the repository at this point in the history
  14. now flags and alias are working

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    e5af852 View commit details
    Browse the repository at this point in the history
  15. milestone: implemented multi-return

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    
    cargo clippy
    
    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    81ffab6 View commit details
    Browse the repository at this point in the history
  16. milestone: implemented union, enum and variantss

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    4a10a41 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    367bc8b View commit details
    Browse the repository at this point in the history
  18. avoid Go keywords conflict with wit's variable names

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    0a85995 View commit details
    Browse the repository at this point in the history
  19. milestone: all codegen tests passed.

    The issue with "fragment is larger than or outside of variable" is
    a known issue and has been resolved in tinygo v0.26.
    
    However, tinygo v0.26 introduces a regression for wasm/wasi target
    where the compiler panics when size 0 passed to malloc. See
    tinygo-org/tinygo#3303 for details
    
    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    e81e340 View commit details
    Browse the repository at this point in the history
  20. refactor: add gen-guest-c dependency to gen-guest-go.

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    e9cd43c View commit details
    Browse the repository at this point in the history
  21. cargo lock file

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    94d4d23 View commit details
    Browse the repository at this point in the history
  22. merged main

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    3672ecb View commit details
    Browse the repository at this point in the history
  23. milestone: passed new tests associated cross-interface feature

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    fdbb206 View commit details
    Browse the repository at this point in the history
  24. formatted code

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    437472d View commit details
    Browse the repository at this point in the history
  25. gh action: installed tinygo

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    24c6a97 View commit details
    Browse the repository at this point in the history
  26. install go 1.19

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    4ae9e57 View commit details
    Browse the repository at this point in the history
  27. generate C files together with Go files

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    16c668e View commit details
    Browse the repository at this point in the history
  28. added option-result test

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    18b1e4b View commit details
    Browse the repository at this point in the history
  29. fix a typo in wit-bindgen-cli doc

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    0942e7f View commit details
    Browse the repository at this point in the history
  30. updated README to include gen-guest-go

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    3ceef03 View commit details
    Browse the repository at this point in the history
  31. Merge remote-tracking branch 'upstream/main' into go-guest-new-2

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    0b0666c View commit details
    Browse the repository at this point in the history
  32. removed option-result.wit

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    6667132 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2023

  1. fix the broken CLI

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 1, 2023
    Configuration menu
    Copy the full SHA
    471bd4a View commit details
    Browse the repository at this point in the history
  2. added go to runtime test

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 1, 2023
    Configuration menu
    Copy the full SHA
    2264ca1 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2023

  1. free C parameters and variables

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 2, 2023
    Configuration menu
    Copy the full SHA
    a5b9b59 View commit details
    Browse the repository at this point in the history
  2. removed memory free for return variables in export and invoke argumen…

    …ts in import
    
    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 2, 2023
    Configuration menu
    Copy the full SHA
    3a80658 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2023

  1. implemented lists

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 3, 2023
    Configuration menu
    Copy the full SHA
    a611483 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c02d1f5 View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2023

  1. fixed a small bug around lowering nested option types

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 4, 2023
    Configuration menu
    Copy the full SHA
    5d1e179 View commit details
    Browse the repository at this point in the history
  2. improve readability of code

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 4, 2023
    Configuration menu
    Copy the full SHA
    0f03936 View commit details
    Browse the repository at this point in the history
  3. changed the variant's package name to the world's name.

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 4, 2023
    Configuration menu
    Copy the full SHA
    32690de View commit details
    Browse the repository at this point in the history
  4. milestone: re-implement results

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 4, 2023
    Configuration menu
    Copy the full SHA
    f18ffeb View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4f93bb8 View commit details
    Browse the repository at this point in the history
  6. re-implement variants and unions

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 4, 2023
    Configuration menu
    Copy the full SHA
    44ea554 View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2023

  1. fixed a few small bugs around variants and union types. Added variant…

    … runtime tests
    
    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 5, 2023
    Configuration menu
    Copy the full SHA
    3d1b341 View commit details
    Browse the repository at this point in the history
  2. turn off gc-leaking in tinygo 0.26

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 5, 2023
    Configuration menu
    Copy the full SHA
    8abd2f1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8f75488 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    dd7e570 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2023

  1. Added flavorful runtime test

    Mossaka committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    0e3156c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0e269f4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b13a81e View commit details
    Browse the repository at this point in the history
  4. removed http from runtime test

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    4d8b9c4 View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2023

  1. Configuration menu
    Copy the full SHA
    cd91d6b View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2023

  1. Configuration menu
    Copy the full SHA
    56e31fd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1c8568e View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2023

  1. updated tinygo to 0.27. All tests should pass now

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    ec22316 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1356b48 View commit details
    Browse the repository at this point in the history
  3. fixed go version to 1.20 instead of 1.2

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    a46da7e View commit details
    Browse the repository at this point in the history
  4. disable string test because unicode hasn't been handled properly

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    68941e7 View commit details
    Browse the repository at this point in the history
  5. deleted wasm abi flag

    Mossaka committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    6d1d4bc View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9f3ee8d View commit details
    Browse the repository at this point in the history
  7. merged main

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    1a49639 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    423ff21 View commit details
    Browse the repository at this point in the history
  9. move C gen files to its own folder

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    c03f2ab View commit details
    Browse the repository at this point in the history
  10. update go from 1.19 to 1.20

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    0b34388 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    7d68011 View commit details
    Browse the repository at this point in the history
  12. changed tinygo crate version to 0.1.0

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    5ae1800 View commit details
    Browse the repository at this point in the history
  13. diable variants test for go

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    860e666 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2023

  1. Configuration menu
    Copy the full SHA
    1080c91 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    12a4113 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2023

  1. Fix referring to foreign imported paths in go

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    b5ca174 View commit details
    Browse the repository at this point in the history
  2. disable lift-foreign tests for now

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    572d8ee View commit details
    Browse the repository at this point in the history
  3. run rustfmt

    Signed-off-by: Jiaxiao Zhou <[email protected]>
    Mossaka committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    b00661f View commit details
    Browse the repository at this point in the history