diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..0603c5e --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +Copyright 2022, the Sapphire developers + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/README.md b/README.md index 0d552a3..8b336ad 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Sapphire A modern, fast and reliable programming language. (WIP) -**WARNING**: Most features in this README (especially the About section) are planned for the future and not yet implemented. +**WARNING**: The About, Basic usage and Examples sections are planned for the future and not yet implemented. They are just sections that describe what is planned for Sapphire for the future, since at the moment there are not many features to describe. ## About Sapphire is a relatively high-level programming language, yet low-level when it needs to be. The language supports low-level memory manipulation using pointers, but pointer arithmetic is only allowed in unsafe contexts, for greater memory safety. Dynamic memory allocation is also a thing, though it is recommended not to use it directly, but instead make great use of [smart pointers](https://en.wikipedia.org/wiki/Smart_pointer). @@ -113,7 +113,7 @@ In that case, symlink ninja-build to ninja (`ln -s /usr/bin/ninja /usr/bin/ninja First-time setup: ``` -./sapphire.sh generate +./sapphire.sh generate ``` To change build type/build system, just run `./sapphire.sh clean` followed by the generate command above. @@ -135,7 +135,7 @@ The compiler is built at `build/sapphirec`. For now, it can only generate object files/LLVM IR, so you'll have to link manually. A few example commands: -``` +```sh $ build/sapphirec --version # prints the compiler version $ build/sapphirec --help # shows usage $ build/sapphirec main.sp # compiles a file @@ -143,4 +143,7 @@ $ build/sapphirec main.sp -o main.o # compiles a file with output filename $ build/sapphirec main.sp -o main.o --msystem darwin # compiles a file for macOS $ build/sapphirec main.sp -o main.o && gcc main.o -o main && ./main # compiles, links and runs $ build/sapphirec main.sp -o main.ll --emit-llvm # display the generated cross-platform LLVM intermediate representation -``` \ No newline at end of file +``` + +## License +[BSD-2](https://opensource.org/licenses/BSD-2-Clause), since that's my favorite license :). See [LICENSE](LICENSE). \ No newline at end of file