tangled
alpha
login
or
join now
stream.place
/
streamplace
74
fork
atom
Live video on the AT Protocol
74
fork
atom
overview
issues
1
pulls
pipelines
iroh: add dynamic library to `make dev`
Eli Mallon
6 months ago
c4c1351a
679d9622
+36
-19
3 changed files
expand all
collapse all
unified
split
Makefile
rust
iroh-streamplace
meson.build
util
streamplace-dev.sh
+1
Makefile
···
77
77
.PHONY: dev
78
78
dev:
79
79
cp ./util/streamplace-dev.sh $(BUILDDIR)/streamplace
80
80
+
cargo build
80
81
PKG_CONFIG_PATH=$(SHARED_PKG_CONFIG_PATH) \
81
82
LD_LIBRARY_PATH=$(SHARED_LD_LIBRARY_PATH) \
82
83
DYLD_LIBRARY_PATH=$(SHARED_DYLD_LIBRARY_PATH) \
+34
-18
rust/iroh-streamplace/meson.build
···
1
1
prog_cargo = find_program('cargo')
2
2
3
3
-
cargo_cmd = '@0@ build --release --target-dir "@1@"'.format(prog_cargo.full_path(), meson.current_build_dir())
4
4
-
archive_dir = meson.current_build_dir()
3
3
+
if get_option('default_library') == 'shared'
4
4
+
cargo_cmd = '@0@ build'.format(prog_cargo.full_path())
5
5
6
6
-
triple = meson.get_external_property('RUST_TRIPLE', '')
7
7
-
if triple != ''
8
8
-
cargo_cmd += ' --target @0@'.format(triple)
9
9
-
archive_dir += '/' + triple
10
10
-
endif
6
6
+
iroh_streamplace_dep = custom_target(
7
7
+
'libiroh_streamplace',
8
8
+
input: [],
9
9
+
output: ['libiroh_streamplace.so'],
10
10
+
command: [
11
11
+
'sh',
12
12
+
'-c',
13
13
+
'cd "@2@/../.." && @0@ && cp "@2@/../../target/debug/libiroh_streamplace.so" "@1@/libiroh_streamplace.so"'.format(cargo_cmd, meson.current_build_dir(), meson.current_source_dir()),
14
14
+
],
15
15
+
build_by_default: true,
16
16
+
)
17
17
+
else
18
18
+
cargo_cmd = '@0@ build --release --target-dir "@1@"'.format(prog_cargo.full_path(), meson.current_build_dir())
19
19
+
archive_dir = meson.current_build_dir()
11
20
12
12
-
iroh_streamplace_dep = custom_target(
13
13
-
'libiroh_streamplace',
14
14
-
input: [],
15
15
-
output: ['libiroh_streamplace.a'],
16
16
-
command: [
17
17
-
'sh',
18
18
-
'-c',
19
19
-
'cd "@2@" && @0@ && cp "@3@/release/libiroh_streamplace.a" "@1@/libiroh_streamplace.a"'.format(cargo_cmd, meson.current_build_dir(), meson.current_source_dir(), archive_dir),
20
20
-
],
21
21
-
build_by_default: true,
22
22
-
)
21
21
+
triple = meson.get_external_property('RUST_TRIPLE', '')
22
22
+
if triple != ''
23
23
+
cargo_cmd += ' --target @0@'.format(triple)
24
24
+
archive_dir += '/' + triple
25
25
+
endif
26
26
+
27
27
+
iroh_streamplace_dep = custom_target(
28
28
+
'libiroh_streamplace',
29
29
+
input: [],
30
30
+
output: ['libiroh_streamplace.a'],
31
31
+
command: [
32
32
+
'sh',
33
33
+
'-c',
34
34
+
'cd "@2@" && @0@ && cp "@3@/release/libiroh_streamplace.a" "@1@/libiroh_streamplace.a"'.format(cargo_cmd, meson.current_build_dir(), meson.current_source_dir(), archive_dir),
35
35
+
],
36
36
+
build_by_default: true,
37
37
+
)
38
38
+
endif
+1
-1
util/streamplace-dev.sh
···
7
7
8
8
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
9
9
STREAMPLACE_DEV_VERSION=$(go run ./pkg/config/git/git.go -v) \
10
10
-
LD_LIBRARY_PATH="$SCRIPT_DIR/lib/usr/local/lib/x86_64-linux-gnu" \
10
10
+
LD_LIBRARY_PATH="$SCRIPT_DIR/lib/usr/local/lib/x86_64-linux-gnu:$SCRIPT_DIR/../target/debug" \
11
11
DYLD_LIBRARY_PATH="$SCRIPT_DIR/lib/usr/local/lib" \
12
12
SP_DEV_FRONTEND_PROXY="http://127.0.0.1:38081" \
13
13
exec "$SCRIPT_DIR/libstreamplace" "$@"