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

stub out more types/funcs to compile against golang.org/x/net/internal/socket #4037

Merged
merged 2 commits into from
Dec 17, 2023
Merged

stub out more types/funcs to compile against golang.org/x/net/internal/socket #4037

merged 2 commits into from
Dec 17, 2023

Conversation

scottfeldman
Copy link
Contributor

These are changes need to compile github.com/domainr/dnsr/ with TinyGo. See issue tinygo-org/net#14.

These change are mostly to fix missing symbols in src/crypto/tls and src/net. Missing types and functions are cut-and-pasted from go1.21.4. Functions are stubbed out returning errors.New("not implemented").

DNRS is compiled by running tinygo test:

sfeldma@nuc:~/work/dnsr$ tinygo test -target=wasi

With this patch, and a corresponding patch for tinygo-org/net to fixup src/net, you should get a clean compile.

…l/socket

These are changes need to compile github.com/domainr/dnsr/ with TinyGo.
See issue tinygo-org/net#14.

These change are mostly to fix missing symbols in src/crypto/tls and
src/net.  Missing types and functions are cut-and-pasted from go1.21.4.
Functions are stubbed out returning errors.New("not implemented").

DNRS is compiled by running tinygo test:

   sfeldma@nuc:~/work/dnsr$ tinygo test -target=wasi

With this patch, and a corresponding patch for tinygo-org/net to fixup
src/net, you should get a clean compile.
@deadprogram
Copy link
Member

@scottfeldman looks like you need to run go fmt.

Unformatted:
  src/syscall/syscall.go
make: *** [GNUmakefile:184: fmt-check] Error 1

@deadprogram
Copy link
Member

Tested alongside tinygo-org/net#17 and worked as expected, so now squash/merging this PR. We also need a PR to update the withnet submodule.

@deadprogram deadprogram merged commit a511f18 into tinygo-org:dev Dec 17, 2023
15 checks passed
@scottfeldman
Copy link
Contributor Author

We also need a PR to update the withnet submodule.

Sorry, I think I missed something here...what needs updated?

Should the "dev" branch be removed from .gitmodules?

[submodule "src/net"]
        path = src/net
        url = https://github.com/tinygo-org/net.git
        branch = dev

crypto-smoke pushed a commit to meshnet-gophers/tinygo that referenced this pull request Feb 14, 2024
…l/socket (tinygo-org#4037)

* stub out more types/funcs to compile against golang.org/x/net/internal/socket

These are changes need to compile github.com/domainr/dnsr/ with TinyGo.
See issue tinygo-org/net#14.

These change are mostly to fix missing symbols in src/crypto/tls and
src/net.  Missing types and functions are cut-and-pasted from go1.21.4.
Functions are stubbed out returning errors.New("not implemented").

DNRS is compiled by running tinygo test:

   sfeldma@nuc:~/work/dnsr$ tinygo test -target=wasi

With this patch, and a corresponding patch for tinygo-org/net to fixup
src/net, you should get a clean compile.
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.

2 participants