Update docs
This commit is contained in:
@@ -23,6 +23,7 @@
|
|||||||
<li><a href="#input_string_msg__string">input(string msg) string</a></li>
|
<li><a href="#input_string_msg__string">input(string msg) string</a></li>
|
||||||
<li><a href="#print_string_msg__string">print(string msg) string</a></li>
|
<li><a href="#print_string_msg__string">print(string msg) string</a></li>
|
||||||
<li><a href="#println_string_msg__string">println(string msg) string</a></li>
|
<li><a href="#println_string_msg__string">println(string msg) string</a></li>
|
||||||
|
<li><strong><a href="#nativecompiler">Native Compiler</a></strong></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
@@ -38,7 +39,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li><code>-o</code> or <code>--output</code>: Tells Solstice where to output a compiled file.</li>
|
<li><code>-o</code> or <code>--output</code>: Tells Solstice where to output a compiled file.</li>
|
||||||
<li><code>-t</code> or <code>--type</code>: Tells Solstice the type of file to output.
|
<li><code>-t</code> or <code>--type</code>: Tells Solstice the type of file to output.
|
||||||
At present, Solstice only supports Ground source files as an output type, but more types may be added in future.</li>
|
This can either be "ground" or "program". "ground" outputs a .grnd program, and "program" outputs a compiled native executable. See <a href="#nativecompiler">here</a> for details.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>Example usage:</p>
|
<p>Example usage:</p>
|
||||||
<pre class="code"><code>solstice fib.sols -o fib.grnd</code></pre>
|
<pre class="code"><code>solstice fib.sols -o fib.grnd</code></pre>
|
||||||
@@ -168,6 +169,19 @@ if guess == "password123" {
|
|||||||
<pre class="code"><code>println("Hello, World!")</code></pre>
|
<pre class="code"><code>println("Hello, World!")</code></pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="nativecompiler">
|
||||||
|
<h2>Native Compiler</h2>
|
||||||
|
<p>Ground has recently added a Ground->Native compiler which allows much faster execution of Ground programs.</p>
|
||||||
|
<p>However, this is quite early in development, and only supports some features:</p>
|
||||||
|
<ul>
|
||||||
|
<li>int data type - No other data type is currently supported.</li>
|
||||||
|
<li>No functions at present</li>
|
||||||
|
</ul>
|
||||||
|
<p>To try the native compiler, use this command:</p>
|
||||||
|
<pre class="code"><code>solstice program.sols -o program -t native --nostdlib</code></pre>
|
||||||
|
<h3>Debugging</h3>
|
||||||
|
<p>Solstice will create a temporary folder in your current directory which you can remove called ".(outputname)_solsbuild". In this folder is the assembly and object file generated by the compiler. If you think that there's a bug with Ground or Solstice, you can use these to find the issue.</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user