-
Notifications
You must be signed in to change notification settings - Fork 6
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
What about ffi with AssemblyScript? #1
Comments
AssemblyScript looks pretty sweet! I just started playing around with it and I think support could be added pretty easily. I just pushed a branch to work on it. The main issues I've noticed are strings and arrays, which have to be done differently than c/rust. I added an option field in the You can check out the changes I made: https://webassembly.studio/?f=tc114km3bvh I haven't really dived too deep into it, are there other language features I'm missing? |
Cool! Are you try const globArray: i32[] = [1, 2, 3];
export function getFirstElement(): i32 {
return globArray[i];
} as well as alloc in heap arrays: export function createArray(len: i32): f32[] {
var arr = new Array<f32>(1);
arr.push(1.0);
arr.push(NaN);
return arr;
} |
That might make more sense. I did the arraybuffers because those seem like they're the most basic element ('normal' arrays are backed by them). I didn't realize arrays are typed in AssemblyScript though! That's basically an arraybuffer with some extra methods here. I think that should be an easy change. I'll try that. |
Hi DeMille. You did a great stuff with integration C/C++ and rust. What do you think add also dcode's AssemblyScript?
The text was updated successfully, but these errors were encountered: