Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 77b82a6

Browse files
authored
Create README.md
1 parent 6d2ec1c commit 77b82a6

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# libsingular-julia
2+
3+
This is the C++ library accompanying [Singular.jl](https://github.com/oscar-system/Singular.jl).
4+
It implements the C++ interface from julia to Singular using [CxxWrap.jl](https://github.com/JuliaInterop/CxxWrap.jl) and [libcxxwrap-julia](https://github.com/JuliaInterop/libcxxwrap-julia).
5+
6+
For Singular.jl versions less than 0.3.2 this was included in Singular.jl but version 0.4 will probably use this library as a separate artifact.
7+
8+
## Building
9+
10+
Compiling `libsingular-julia` from source requires a C++ enabled compiler, a `libcxxwrap-julia` installation and a Singular installation.
11+
12+
```bash
13+
git clone https://github.com/oscar-system/libsingular-julia \
14+
cmake -DJulia_PREFIX=/home/user/path/to/julia \
15+
-DSingular_PREFIX=/home/user/path/to/singular
16+
-DCMAKE_INSTALL_PREFIX=home/user/prefix/for/libsingular-julia \
17+
-DJlCxx_DIR=/home/user/path/to/libcxxwrap-julia/lib/cmake/JlCxx \
18+
-DCMAKE_BUILD_TYPE=Release \
19+
-S libsingular-julia -B build \
20+
21+
cmake --build build --config Release --target install -- -j${nproc}
22+
```
23+
24+
### Overriding the default artifacts for Singular.jl
25+
26+
Put the following into `~/.julia/artifacts/Overrides.toml` to replace the `libsingular-julia` artifact:
27+
28+
```toml
29+
[ae4fbd8f-ecdb-54f8-bbce-35570499b30e]
30+
libingular_julia = "/home/user/prefix/for/libsingular-julia"
31+
```
32+
33+
Overrides for `Singular` and `libcxxwrap-julia` with the directories used during the build need to be added as well, e.g.:
34+
35+
```toml
36+
[bcd08a7b-43d2-5ff7-b6d4-c458787f915c]
37+
Singular = "/home/user/path/to/Singular"
38+
39+
[3eaa8342-bff7-56a5-9981-c04077f7cee7]
40+
libcxxwrap_julia = "/home/user/path/to/libcxxwrap-julia"
41+
```

0 commit comments

Comments
 (0)