Skip to content
This repository was archived by the owner on May 4, 2022. It is now read-only.

Odin language support #151

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions languages/odin.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name = "odin"
entrypoint = "main.odin"
extensions = [
"odin"
]
packages = [
"llvm",
"clang"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If possible, it'd be nice if you used a version of clang that other language configs are already using. At the very least, try to choose a specified version of clang and llvm.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would clang-10 and llvm-10 work?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that works 👍

]
setup = [
"cd /tmp",
"git clone https://github.com/odin-lang/odin",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to delete the files once you're done using them.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly, Odin requires its standard library to be relative to the itself. Therefore, at the minimum, the standard library cannot be deleted. How would you like me to handle that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the files be moved to somewhere like /usr/local/share/odin?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! That can be done

"cd odin",
"make",
"ln -s /tmp/odin/odin /usr/local/bin/odin"
]
versionCommand = [
"odin",
"version"
]

[run]
command = [
"odin",
"run",
"."
]

[tests]

[tests.hello]
code = "package main\nimport \"core:fmt\"\nmain::proc(){fmt.println(\"Hello, World!\");}"
output = "Hello, World!\n"