init-projects/README.md

69 lines
2 KiB
Markdown
Raw Normal View History

2023-09-19 11:54:28 +02:00
# Init projects! <!-- omit in toc -->
- [C](#c)
- [C++](#c-1)
2023-09-19 16:07:18 +02:00
- [OCaml](#ocaml)
2023-09-19 16:17:33 +02:00
- [Rust](#rust)
2023-09-19 11:54:28 +02:00
- [Typescript](#typescript)
2023-09-07 17:09:24 +02:00
2023-09-19 11:51:53 +02:00
## C
Copy and paste [`c/`](./c/) directory, and you should be good to go!
2023-09-19 15:42:14 +02:00
- Remember to change executable's name and change std's target in
the [`Makefile`](./c/Makefile).
2023-09-19 11:51:53 +02:00
- **Run `make` to compile the program.**
- **Run `make dev` to compile the program in debug mode.**
- **Run `make clean` to clean artifacts.**
2023-09-19 11:55:18 +02:00
> Note that in headers, the syntax is `PROJECTNAME_FILENAME_H`
2023-09-19 11:51:53 +02:00
## C++
Copy and paste [`cpp/`](./cpp/) directory, and you should be good to go!
2023-09-19 15:42:14 +02:00
- Remember to change executable's name and change std's target in
the [`Makefile`](./cpp/Makefile).
2023-09-19 11:51:53 +02:00
- **Run `make` to compile the program.**
- **Run `make dev` to compile the program in debug mode.**
- **Run `make clean` to clean artifacts.**
2023-09-19 11:55:18 +02:00
> Note that in headers, the syntax is `PROJECTNAME_FILENAME_HPP`
2023-09-19 11:51:53 +02:00
2023-09-19 16:07:18 +02:00
## OCaml
Copy and paste [`ocaml/`](./ocaml/) directory, and you should be good to go!
- Remember to change values in the [`dune-project`](./ocaml/dune-project).
- **Run `dune exec example` to run the program.**
- **Run `dune runtest` to run tests.**
> Example of custom repository source:
>
> ```dune
> (source
> (uri https://dev.example.com/project.git))
> ```
2023-09-19 16:17:33 +02:00
## Rust
Copy and paste [`rust/`](./rust/) directory, and you should be good to go!
- Remember to change values in the [`Cargo.toml`](./rust/Cargo.toml).
- **Run `cargo run` to run the program.**
2023-09-07 17:09:24 +02:00
## Typescript
2023-09-19 11:51:53 +02:00
Copy and paste [`typescript/`](./typescript/) directory, and you should be good to go!
2023-09-07 17:09:24 +02:00
- Remember to change values in the [`package.json`](./typescript/package.json).
- Then, to install all the dependencies, run `npm install`.
- To check if there is any new update for dependencies, run `npm outdated`, makes
changes accordingly to run the latest version, you may need to run `npm update`
to apply the updates after the modification of [`package.json`](./typescript/package.json).
- **Run `npm run main` to start the program.**
---
Contribution? Yes, please!