carbon-language / carbon-lang

Carbon Language's main repository: documents, design, implementation, and related tools. (NOTE: Carbon Language is experimental; see README)
https://github.com/carbon-language/carbon-lang/blob/trunk/README.md
Other
32.31k stars 1.48k forks source link

How to compile a shared library .so #3997

Closed panjea closed 1 month ago

panjea commented 1 month ago

Description of the bug:

It is not clear how to call the compiler to build a shared library .so. It is not even clear where the compiler is, and what it is called. I was expecting this command:

/usr/local/bin/bazelisk-linux-amd64 run //explorer -- ./explorer/testdata/print/format_only.carbon

To have built something like carbonc which i can call directly on .carbon files.

Where is bazelisk putting the compiler? Under carbon-lang/bazel-bin i see explorer, is explorer the name of the carbon compiler?

Link to documentation:

No response

What should it say instead?

No response

Any other information, logs, or outputs that you want to share?

No response

chandlerc commented 1 month ago

Please see our project status: https://github.com/carbon-language/carbon-lang#project-status

This is an early, experimental project. The explorer provides a way to demo the semantics of Carbon.

We are working on a compiler in the toolchain tree, but it is not quite far enough along to compile Carbon code into interesting things like shared libraries. We're working right now on getting all of the basic functionality (language designs, standard library, linking) into the compiler. Shared libraries are a (very) long way away.