This project provides a development environment for the Bend programming language using Visual Studio Code and Docker. The environment is configured to support GPU acceleration with NVIDIA CUDA.
- Docker
- Visual Studio Code
- Remote - Containers extension for Visual Studio Code
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Open the project in Visual Studio Code:
code .
-
Reopen in Container:
- Press
F1
and selectRemote-Containers: Reopen in Container
.
- Press
- CUDA Support: The development container is based on
nvidia/cuda:12.4.1-devel-ubuntu20.04
and is configured to use GPU acceleration. - Bend Language Support: The container installs the Bend language and the necessary extensions for Visual Studio Code.
The .devcontainer/devcontainer.json
file includes customizations for Visual Studio Code:
- Extensions: The
RohanVashisht.bend
extension is installed for Bend language support. - Remote User: The container runs as the
vscode
user.
The bend-guide
directory contains example Bend scripts to help you get started:
01_hello_world.bend
: A simple "Hello, World!" program.02_basic_functions_and_datatypes.bend
: Basic functions and data types in Bend.02a_shape.bend
: Custom data types and pattern matching.02b_list.bend
: Working with lists.02c_lambda.bend
: Inline functions (lambdas).03_recursive_datatypes.bend
: Recursive data types.03a_fold_consuming.bend
: Folding data structures.03b_bend_generating.bend
: Generating data structures.04_parallel_sum_using_bend.bend
: Parallel sum using Bend.
To run a Bend script, use the following command inside the container:
bend <script-name>.bend
For example:
bend bend-guide/01_hello_world.bend
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License.