b3-rs icon indicating copy to clipboard operation
b3-rs copied to clipboard

Commit generated opcodes to remove the need for ruby?

Open lqd opened this issue 2 years ago • 3 comments

Hi :wave:

Could the dependency on ruby be removed maybe, by e.g. committing the generated opcodes to the repository?

lqd avatar Apr 14 '23 15:04 lqd

Hi wave

Could the dependency on ruby be removed maybe, by e.g. committing the generated opcodes to the repository?

Hello! I would not remove it as opcodes might be changed in the future or new ones added, always rebuilding them manually is not a great idea IMO. What might be done instead is maybe rewrite the DSL in Rust itself, but it is a large task to do

playXE avatar Apr 14 '23 15:04 playXE

I did not mean to rebuild them manually, only that the build script for example checked that an existing opcode_generated.rs is older than the opcode.opcodes file, and then automatically rebuild it.

That would allow to have the automation to keep the generated code up to date without needing to manually call the generator, while also allowing for people to use the library without ruby installed, which could also be achieved by publishing to crates.io with the generated opcodes there of course.

lqd avatar Apr 14 '23 15:04 lqd

I am not sure how to do that properly but that is definitely a great idea. If you have some examples on how to do it or could do a PR, I would love to see it. :D

Also, b3-rs is not yet on Crates.io, I am checking some stuff for proper functionality and then will probably publish 0.1.0 release.

playXE avatar Apr 14 '23 15:04 playXE