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

Do Gleam support compiling to Rust? #3145

Closed
Jerrody opened this issue May 16, 2024 · 7 comments
Closed

Do Gleam support compiling to Rust? #3145

Jerrody opened this issue May 16, 2024 · 7 comments

Comments

@Jerrody
Copy link

Jerrody commented May 16, 2024

I would use Gleam for Game Engine in Rust as script language.

@lpil
Copy link
Member

lpil commented May 17, 2024

It does not, no. You could compile to JavaScript and embed a JS runtime in Rust though

@lpil lpil closed this as not planned Won't fix, can't repro, duplicate, stale May 17, 2024
@Jerrody
Copy link
Author

Jerrody commented May 17, 2024

It does not, no. You could compile to JavaScript and embed a JS runtime in Rust though

Is it planned to introduce compile to Rust?

@lpil
Copy link
Member

lpil commented May 17, 2024

No, Rust is a very bad compile target, there would be no particular advantages.

It would be especially bad for your use case, embedding a scripting language runtime would be much better as it's be easier to interop with and you could load code at runtime.

@inoas
Copy link
Contributor

inoas commented May 17, 2024

I would love to compile to rust to be able to use the rust eco system as an FFI much like I can use the Erlang one.

@lpil
Copy link
Member

lpil commented May 17, 2024

Compiling to Rust would not make it easier to use the Rust ecosystem than it already is today.

@inoas
Copy link
Contributor

inoas commented May 17, 2024

You mean as a NIF? OK then nvm.

@lpil
Copy link
Member

lpil commented May 17, 2024

Yes, you would need to write the same style of boilerplate even if we compiled to Rust

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

3 participants