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

No example that demonstrates binding to C/C++ #30

Open
adv-sw opened this issue Mar 24, 2024 · 3 comments
Open

No example that demonstrates binding to C/C++ #30

adv-sw opened this issue Mar 24, 2024 · 3 comments

Comments

@adv-sw
Copy link

adv-sw commented Mar 24, 2024

Inspected examples here : https://github.com/AssemblyScript/examples

We have a web assembly SDK implemented in C++.

Want to be able to link AssemblyScript to to it.

So need to be able to call AssemblyScript from C++ & C++ from AssemblyScript.

Nothing fancy, simple types. Or C interface & can figure out from there.

@CountBleck
Copy link
Member

That really depends on the type of runtime, like WasmEdge, wasm3, Wasmer, or Wasmtime, as well as the way data is passed in your APIs.

@CountBleck
Copy link
Member

Also, I'm assuming this C/C++ code is on the host side (not compiled to Wasm). We don't yet support linking with C/C++ that's compiled to Wasm.

@adv-sw
Copy link
Author

adv-sw commented Mar 25, 2024

The C++ code is compiled to wasm. The binding required is on the wasm side, hence the runtime is not important (as I understand it). There is binding to host side, which is resolved via this C++ API, hence why I want assemblyscript binding wasm side so AssemblyScript programmers can also drive our 3D web engine.

Here's our C++ tutorial : http://advance-software.com/develop/#tutorial

Would like to be able to do the same via AssemblyScript.

Our underlying is wasmtime, but I don't think that's relevant as AssemblyScript will not be binding to the host.

That said, I suppose it could to cut out jumping thru C++ to resolve. Open to this as a possible solution.

We don't yet support linking with C/C++ that's compiled to Wasm.

Then AssemblyScript is not as of time of writing an XSG 3D web compatible language.

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

No branches or pull requests

2 participants