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

Trying to make an updated working version #1

Closed
Ivo-Balbaert opened this issue Jul 23, 2023 · 2 comments
Closed

Trying to make an updated working version #1

Ivo-Balbaert opened this issue Jul 23, 2023 · 2 comments

Comments

@Ivo-Balbaert
Copy link
Contributor

Hi Jared, awesome project!

I wanted to make the project work again in current Roc
I had to correct a lot of new errors because of this, but most where trivial (see attached code).
When trying to build, both cc and the legacy linker gave me:

roc --linker=legacy Roctris.roc
🔨 Rebuilding platform...
ld: platform/linux-x64.o: in function host::execute_main': /home/ivo/roc_repo/roctris/platform/src/lib.rs:82: undefined reference to roc__mainForHost_size'
ld: platform/linux-x64.o: in function host::call_the_closure': /home/ivo/roc_repo/roctris/platform/src/lib.rs:118: undefined reference to roc__mainForHost_1_Fx_result_size'
ld: /home/ivo/roc_repo/roctris/platform/src/lib.rs:122: undefined reference to roc__mainForHost_1_Fx_caller' thread 'main' panicked at 'not yet implemented: gracefully handle ld(orzig` in the case of wasm with --optimize) returning exit code Some(1)', crates/compiler/build/src/program.rs:1036:17

I didn't see a solution for this, so I tried with the latest basic-cli v0.4.0, moving some of your code to its cache, causing some more strange errors.

Do you see a way to get this working again? It would be phantastic to have this beautiful project working again. Thanks!
roctris.zip

@jared-cone
Copy link
Owner

Hey glad you're interested! I haven't been keeping up with Roc, but my guess is roctris's lib.rs needs to be updated to be similar to the latest CLI example at https://github.com/roc-lang/roc/blob/main/examples/cli/cli-platform/src/lib.rs . For example, updating the contents in the extern "C" {...} block, and some of the roc functions below that such as roc_panic

@Ivo-Balbaert
Copy link
Contributor Author

Thanks very much! I only had to update the contents in the extern "C" block, and now it works!

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