Commit Graph

30 Commits

Author SHA1 Message Date
Lofty 35810c9f87
Rust cleanup (#1573)
* rust: formatting cleanup

* rust: explicitly mark as ISC license

* rust: use std::ffi C types instead of libc dependency
2025-10-10 16:04:19 +02:00
Miodrag Milanovic e16bd45b01 clangformat 2025-09-30 14:20:45 +02:00
Lofty 8f8181c717 rust: extend example_printnets to demo iterators 2025-09-30 07:59:08 +01:00
Lofty 0ee8181733 rust: rework ownership model 2025-09-30 07:59:08 +01:00
Lofty 2e4ef6f71f
rust: small updates (#1560) 2025-09-24 13:59:30 +02:00
gatecat 226a2dfdb4 clangformat
Signed-off-by: gatecat <gatecat@ds0.me>
2025-05-20 13:19:52 +02:00
Lofty 06992bda0a
rust: add getBels() binding (#1460) 2025-03-19 10:02:34 +01:00
Catherine cd7f7c12f1 CMake: refactor architecture-specific build system parts.
Two user-visible changes were made:
* `-DUSE_RUST` is replaced with `-DBUILD_RUST`, by analogy with
  `-DBUILD_PYTHON`
* `-DCOVERAGE` was removed as it doesn't work with either modern GCC
  or Clang
2025-01-21 17:13:03 +00:00
Catherine 155adc3f5d CMake: rationalize and refactor build system.
The two main changes, done together in this commit, are:
* Eliminating most instances of `aux_source_directory()`, replacing
  them with explicit file listings; and
* Moving these file listings into respective subdirectories by
  representing respective nextpnr components as interface libraries.

In addition, the GUI CMake script tree was simplified since it had
a lot of unused/redundant code.

The `aux_source_directory()` command is not recommended for use by
CMake itself because it misses dependency changes when adding/removing
files, and consequently causes build failures requiring a clean rebuild.

This commit does not touch anything related to architectures/families,
which are very complex and redundant all on their own.
2025-01-16 11:36:44 +01:00
Miodrag Milanovic edcafcf085 Ignore compile artifacts in rust directory 2024-04-19 11:55:49 +02:00
Lofty a0e360fd9f rust: convert netinfo_driver to Option 2024-01-18 14:07:23 +01:00
Lofty 14a09061a5 rust: rework portref_cell 2024-01-18 14:07:23 +01:00
Lofty dfd651a132 rust: fix some calls that got wrongly replaced 2024-01-18 14:07:23 +01:00
Lofty d0e01661a5 rust: fix build error 2024-01-18 14:07:23 +01:00
Lofty 6e4e81429c rust: nets isn't send/sync 2024-01-18 14:07:23 +01:00
Lofty c8e1cbc5f2 rust: transform pointers to references where possible 2024-01-18 14:07:23 +01:00
Lofty c5fc34f11a rust: slight cleanup 2024-01-18 14:07:23 +01:00
Lofty f12e76479c rust: add mutex for arch manipulation 2024-01-18 14:07:23 +01:00
gatecat 2afb1f632e clangformat
Signed-off-by: gatecat <gatecat@ds0.me>
2024-01-12 10:09:28 +01:00
dragonmux 6a9ad61051 rust: Fixed an unused parameter warning 2024-01-04 10:39:45 +01:00
dragonmux cb269b46d6 rust: Made the wrap helper `inline` and fixed an accidental copy error 2024-01-04 10:39:45 +01:00
dragonmux 3e46fbc655 rust: Reworked the unwrap helpers by effectively hiding the crime of memcpy()'ing into a non-POD type from the compiler
There is still the possibility that this can explode horribly, but the result should be the same codegen and fixes the warning

This also makes the helpers `inline` so they'll usually be compiled out for a nice speed boost
2024-01-04 10:39:45 +01:00
dragonmux cfeb588d32 rust: Reworked `npnr_context_get_pips_leak()` using std::accumulate() and fixed an accidental copy problem 2024-01-04 10:39:45 +01:00
dragonmux 7d0c4eaf1b rust: Reworked `npnr_context_get_wires_leak()` using std::accumulate() and fixed an accidental copy problem 2024-01-04 10:39:45 +01:00
Lofty 50d43742ce rust: silence warnings 2024-01-03 14:51:33 +01:00
gatecat e12ab86c75 rust: Fix segfault
Signed-off-by: gatecat <gatecat@ds0.me>
2024-01-03 13:42:18 +01:00
Lofty 1bbcc5f2c4 (broken) third round of review fixes 2024-01-03 13:42:18 +01:00
Lofty 49d505831d second round of review fixes 2024-01-03 13:42:18 +01:00
Lofty 1dbd81067a first round of review fixes 2024-01-03 13:42:18 +01:00
Lofty d2297b1ba0 Add Rust FFI bindings 2024-01-03 13:42:18 +01:00