17 releases (6 stable)
2.7.1 | Aug 9, 2024 |
---|---|
2.4.2 | Sep 6, 2023 |
2.1.0 | Dec 25, 2022 |
1.5.1 | May 19, 2021 |
0.1.6 | Jul 31, 2019 |
#1691 in Network programming
160 downloads per month
Used in 3 crates
1.5MB
123 lines
Contains (static library, 400KB) oberon_3.0.15.lib, (static library, 400KB) liboberon_3.0.15.a, (static library, 400KB) liboberon_3.0.15.a, (static library, 130KB) libmodem.a, (static library, 130KB) libmodem.a, (static library, 24KB) liboberon_mbedtls_3.0.15.a and 2 more.
nrfxlib-sys
This is a Rust wrapper for the Nordic
nrfxlib set of libraries,
primarily libmodem
and liboberon
for the nRF91* series chips (System-in-Packages). Supported chips are the following:
- nRF9160
- nRF9151
- nRF9161
Any binary which uses this crate is going to need to provide a bunch of C library functions, because Nordic's library expects them. This includes, but is not limited to:
- atoi
- snprintf
- strol
- strchr
You can't just link newlib
, because that defines memset
which clashes with
the compiler-builtin
crate's definition of memset
. Answers on a post-card
please - for now I'm using
tinyrlibc.
Using
NOTE: This crate does not follow semver. The version of this crate tracks the version of the underlying Nordic libraries.
In your own program or library, you can depend on this crate in the usual fashion:
[dependencies]
# A chip feature must be selected
nrfxlib-sys = { version = "=2.7.1", feature = ["nrf9160"] }
Because the modem library has its debug sections compressed and Rust's tooling doesn't have support for that by default, this crate either strips the debug sections or decompresses them.
By default the crate uses the llvm-tools
that can be installed using rustup component add llvm-tools
.
In this case the debug sections get stripped.
If you'd rather have the debug sections decompressed, then disable the default features on this crate and
enable the arm-none-eabi-objcopy
feature. This will try to use the arm-none-eabi-objcopy
binary that you can
download from the ARM website. This one does have support for debug section compression.
This is a low level wrapper. You might prefer the blocking higher-level wrapper:
[dependencies]
nrfxlib = "*"
You might also prefer the async higher-level wrapper:
[dependencies]
nrf-modem = "*"
Licence
Any of the code outside the ./third_party
folder is under the Blue Oak
Licence. Any code inside the ./third_party
folder (include
the Nordic nrfxlib) has its own LICENCE file.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.
Changelog
Unreleased Changes (Source | Changes)
v2.7.1 (Source | Changes)
- Fixed build by including the binary blobs
v2.7.0 (Source | Changes)
- Updated to nrfxlib v2.7.0
- Added support for the nRF9151 and nRF9161
v2.4.2 (Source | Changes)
- Updated to nrfxlib v2.4.2
- Improved the way the build script searches for
llvm-objcopy
v2.1.0 (Source | Changes)
- Updated to nrfxlib v2.1.0
- Added many oberon crypto functions
v1.4.2 (Source | Changes)
- Updated to nrfxlib v1.4.2
- Added new arguments to call to
bsd_init
function. - Switched back to
bindgen
crate, after Cargo issue #5730 was closed.
v1.2.0 (Source | Changes)
- Updated to nrfxlib v1.2.0
- Fixed some build errors caused by usize/u32 and isize/i32 conversions.
v1.1.0-rc3+rel1 (Source | Changes)
- Updated to nrfxlib v1.1.0-rc3
- Generate headers for
libnrf_cc310
(CryptoCell 310 API) - Generate headers for
liboberon
(Optimised software crypto implementation)
v1.1.0-rc2+rel1 (Source | Changes)
- Updated to nrfxlib v1.1.0-rc2, including libbsd 0.5.0
- Changed crate version to track Nordic's nrfxlib version number.
v0.2.0 (Source | Changes)
- Require users to install bindgen as a command-line tool.
v0.1.7 (Source | Changes)
- Use Cargo 5730 workaround.
- Update bindgen to 0.51
- Rustfmt generated code
- Reformat using tabs
v0.1.6 (Source | Changes)
- Bundle the C headers (fixes Travis build)
v0.1.5 (Source | Changes)
- Sub-module in upstream nrfxlib.
v0.1.4 (Source | Changes)
- Add the bsd_limits.h, nrf_key_mgmt.h and nrf_apn_class.h headers.
v0.1.3 (Source | Changes)
- Updates to this README to specify checkout of tag v1.0.0.
- Added a Travis CI file.
v0.1.2 (Source | Changes)
- Add NEWLIB_PATH so user can point to correct newlib headers.
v0.1.1 (Source | Changes)
- Updates to the README and crate metadata
v0.1.0 (Source)
- First version
No runtime deps
~0–1.8MB
~36K SLoC