Skip to content

Commit 0a3a637

Browse files
committed
docs: link to online doc from README
1 parent fb6ba8f commit 0a3a637

File tree

2 files changed

+5
-60
lines changed

2 files changed

+5
-60
lines changed

README.md

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,9 @@ This repository is a C client for [SpringQL](https://github.com/SpringQL/SpringQ
77

88
You can link your application with the shared library and run SpringQL in embedded mode.
99

10-
### Getting Started
10+
## Documentation
1111

12-
#### APIs
13-
14-
Take a short look to [springql.h](https://github.com/SpringQL/SpringQL-client-c/blob/main/springql.h), which declares all of C APIs and types to use from your application.
15-
16-
#### Installation
17-
18-
All you need to do are:
19-
20-
- Download latest header file and shared library from [release page](https://github.com/SpringQL/SpringQL-client-c/releases).
21-
- Put `springql.h` to somewhere where your compiler recognize as an include path.
22-
- Put `libspringql_client.{so,dylib}` to somewhere where your compiler recognize as a library path (one in `$LD_LIBRARY_PATH` is a good option).
23-
24-
#### Example application
25-
26-
See [`c_example/`](https://github.com/SpringQL/SpringQL-client-c/tree/main/c_example) for how to write and build a SpringQL embedded application.
12+
Read <https://SpringQL.github.io/> for installation guide, tutorials, and references.
2713

2814
## Versioning
2915

c_example/README.md

Lines changed: 3 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,8 @@
1-
## Writing an SpringQL C application (embedded mode)
1+
## Example C applications
22

3-
See [`example.c`](example.c)
3+
Most of applications under this directory are introduced in a [documentation page](https://springql.github.io/get-started/write-basic-apps).
44

5-
## Building
6-
7-
You need to put `springql.h` to an include path and `libspringql_client.{so,dylib}` to a library path first. Then,
8-
9-
```bash
10-
gcc example.c -lspringql_client -o run_example
11-
```
12-
13-
If you haven't downloaded the header and shared library files, then,
14-
15-
```bash
16-
(cd ..; cargo build) # build shared library
17-
gcc example.c -lspringql_client -o run_example -I.. -L../target/debug
18-
```
19-
20-
You can also use CMake here.
21-
22-
```bash
23-
(cd ..; cargo build) # build shared library
24-
cmake . && make
25-
```
26-
27-
## Running the sample application
28-
29-
First, you need to run a source server to generate trade data.
30-
You may need to install `nc` (netcat) to your system.
31-
32-
```bash
33-
python print_trade.py | nc -l 19876 # running a source server on TCP port 19876
34-
```
35-
36-
Finally the example app runs.
37-
38-
```bash
39-
./run_example
40-
41-
[row#0] ts=2021-11-23 05:38:32.589299000 amount=200
42-
[row#1] ts=2021-11-23 05:38:32.590267000 amount=100
43-
[row#2] ts=2021-11-23 05:38:32.590284000 amount=900
44-
[row#3] ts=2021-11-23 05:38:32.590295000 amount=500
45-
[row#4] ts=2021-11-23 05:38:32.590305000 amount=100
46-
```
5+
Read it for building, running the apps.
476

487
## License
498

0 commit comments

Comments
 (0)