Getting Started with Topaz
Welcome! This guide will walk you through setting up your development environment for Topaz (once available), writing your very first Topaz program, and understanding the basic project structure. Our goal is to get you up and running as smoothly as possible.
Installation
(The Topaz language and its toolchain are currently under active development. This section will be updated with detailed installation instructions once the first official SDK (Software Development Kit) is released. Methods might include package managers, downloadable binaries, or instructions for building from source.)
Illustrative Installation (Future Placeholder):
You might install Topaz using a command like:
# Example using a hypothetical package manager
# $ cool_package_manager install topaz-sdk
# Or by downloading and setting up a binary (illustrative)
# $ wget [https://topaz.ooo/downloads/topaz-sdk-v0.1.0.tar.gz](https://topaz.ooo/downloads/topaz-sdk-v0.1.0.tar.gz)
# $ tar -xzf topaz-sdk-v0.1.0.tar.gz
# $ export PATH=$(pwd)/topaz-sdk/bin:$PATH
Please check back for official installation instructions.
Your First Topaz Program: "Hello, Topaz!"
Let's create the traditional "Hello, World!" program, Topaz style.
- Create a new file named
hello.tpz
. - Open it in your favorite text editor and type the following Topaz code:
;; hello.tpz
;; Your first adventure into the world of Topaz!
;; In Topaz, operations are typically written as (OPERATOR ARG1 ARG2 ...).
;; io:print is a function from the io module to output text to the console.
(io:print "Hello from Topaz!")
This simple line of code instructs Topaz to print the string "Hello from Topaz!" to your console.
Running Your Program:
(The exact commands to compile (if needed) and run Topaz programs will be provided with the official toolchain. For now, imagine a command like the following to execute your hello.tpz
file.)
Hypothetical execution:
# This command will depend on the Topaz runtime or interpreter
topaz run hello.tpz
If successful, you should see the output:
Hello from Topaz!
Congratulations! You've just run your first Topaz program.
Basic Project Structure (Conceptual)
As your projects grow, you'll want to organize your files. While the official project structure and build tooling are still being finalized, a typical Topaz project might adopt a structure similar to this:
my_topaz_project/
├── src/ # Source files
│ ├── main.tpz # Main entry point of your application
│ └── lib/ # Reusable library code or modules
│ └── utils.tpz # Example utility module
├── topaz_project.toml # (Hypothetical) Project manifest: dependencies, config
├── .gitignore # Git ignore file
└── README.md # Project description
src/
: This directory would contain all your Topaz source code (.tpz
files).topaz_project.toml
(or similar): A future manifest file could define project metadata, dependencies, build configurations, etc., much likeCargo.toml
for Rust orpackage.json
for Node.js.
(Further details on the official project manifest format, how modules are defined and linked, and the build system will be provided as these components of the Topaz ecosystem mature.)
Next Steps
Now that you've had a first taste of Topaz, you're ready to explore further:
- Dive into the detailed Language Reference to understand the core syntax, data types, and operations.
- Check out our Practical Guides for tutorials on common programming tasks and Topaz-specific patterns.
- (Soon) Experiment with Topaz directly in our upcoming online Playground!
We're excited to see what you'll build with Topaz!