Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Implement PPAPI for PNaCl #37

Open
axw opened this issue May 27, 2013 · 2 comments
Open

Implement PPAPI for PNaCl #37

axw opened this issue May 27, 2013 · 2 comments
Milestone

Comments

@axw
Copy link
Member

axw commented May 27, 2013

A while ago I did some work to show that llgo is capable of generating PNaCl modules. As a result of that, I began working on a PPAPI package for Go.

The blog post's instructions are no longer valid, and the PPAPI package no longer works with the go1.1 changes in llgo (chiefly due to function representation changes, and possibly due to breakage in runtime type information).

@hzmangel
Copy link

I have met missing function body error while doing go build under directory llgo/pkg/nacl/ppapi, and I have found one solution for this: https://codereview.appspot.com/7857044/patch/16001/3002

I think the code related to this error is http://golang.org/src/cmd/gc/pgen.c, at line 36, the error raised if compiling pure go function, so the empty.c is used to false this condition.

I am still a newbie of Go, and I am still learning. Hope this can give some help.

@axw
Copy link
Member Author

axw commented May 27, 2013

Thanks. Yes, for pure-Go packages the standard Go compiler ensures that all function declarations have a corresponding definition.

Your solution is sound, but I've just been stubbing out the function; IIRC it was just one function, createModule. I'll probably be adding some C code to that package in the coming days anyway.

Ideally we wouldn't be relying on there being a binary version of the package at all, but it's necessary until a custom go/types importer is implemented.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants