We have been working on a way for Roku devices to run C, C++, Rust, and other languages. Our goal is to bring the wealth of libraries written in these languages to the Roku platform and empower the developer to code in their language of choice.
We are looking for pilot customers that would be willing to trial run our product. The ideal customer has knowledge of compilers and build systems such as rustc/clang and cargo/CMake. If you are interested, please send a private message including your contact details and company name.
We can compile standard C/C++ programs that rely on libc and libc++ (C longjmp and C++ exceptions disabled), as well as Rust using an experimental platform. You can even call functions defined in BrightScript and vice versa using externs. The generated code has been tested against thousands of unit tests such as floating point behavior, signed and unsigned operations, control flow, indirect calls, memory loads and stores, etc.
More work is being done to expand the capabilities of this platform such as completing the file-system implementation, exposing POSIX sockets using roStreamSocket/roDataGramSocket, supporting longjmp and exceptions, and even researching potential POSIX thread implementations using Tasks.
We are excited to unveil this technology and look forward to what you will create with it.
@Beor Thanks! That's actually what started the project was a lack of browser and WebView for apps. We'll be posting another demo here shortly of a very popular game that's been ported to Roku, stay tuned!
Perfect, good job if you need help let me know I do not know much c ++ but in what I can contribute I will do it, it would be nice if everyone participates in the Roku community.
I think there's latent potential if, in addition to duktape, this leverages cpp-inherit (https://github.com/jam1garner/cpp-inherit) a crate written by a friend of mine which supplies a macro for inheriting Rust structures from C++ classes.
@MotleyCoder Thanks for your great work on this! I'm also very interested in the WebView capabilities, and was wondering if you possibly had any updates on this?
Would be great to allow the community to create web apps specifically for roku, with a bridge to the roku specific apis.
Unfortunately，it seems that the C++ code in demo doesn't execute really . The output is from test.min.x.brs which are blurred， so I can't find out what the magic is .
I want to transplant some library written in C++ to Roku , so it is very important for me to confirm that whether C++ code can run on Roku or not.
If you'd like to see the magic, visit https://github.com/MotleyCoderDev/wasm2brs
For an article on how it works: https://motley-coder.com/2020/12/20/webassembly-on-roku/
Let me know if you have any questions, happy to help